Skip to content

Benchmark transition to native PHP 8.4 HTMLDocument #459

@g105b

Description

@g105b

The release of PHP 8.4 introduces much improved native DOM functionality. https://www.php.net/manual/en/class.dom-htmldocument.php

This should make a lot of GT's Dom redundant, and should increase speed due to it being native bindings.

However, it will be impossible to switch to the new native functionality without some work, and the work is imposed on GT along with other users of the DOM - all new native DOM classes are final. This means that GT DOM might have to take the decision to go back to proxying the native classes, rather than extending them, so that the GT classes can be used and extended by DomTemplate, and other projects.


Before any transition work can start, a benchmark needs to be defined, so we know what we're aiming for.

This should only be a few simple scripts that work with large documents or repetitive tasks on the smaller documents, but each script should run twice: once with the GT Dom, and once with the new native Dom. The actual code should be identical for both tests - in fact, there could be a dynamic instantiation of each class within the same script.

Metadata

Metadata

Assignees

Labels

questionUsage questions or clarification requests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions