History log of /php-src/ext/xmlwriter/tests/xmlwriter_toMemory_flush_combinations.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# f5e81fe1 29-Sep-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Optimize in-memory XMLWriter

We're currently using a libxml buffer, which requires copying the buffer
to zend_strings every time we want to output the string. Furthermore,
its use of

Optimize in-memory XMLWriter

We're currently using a libxml buffer, which requires copying the buffer
to zend_strings every time we want to output the string. Furthermore,
its use of the system allocator instead of ZendMM makes it not count
towards the memory_limit and hinders performance.

This patch adds a custom writer such that the strings are written to a
smart_str instance, using ZendMM for improved performance, and giving
the ability to not copy the string in the common case where flush has
empty set to true.

Closes GH-16120.

show more ...