Performance improvements to xml.Node

at 2005-07-04 in Announcements by friebe (0 comments)

There has been ongoing work on the xml.Node class to improve its performance. Some changes have already been comitted:

  • Use strcspn() instead of strtok() (see here for the test script and here for the results)
  • Remove helper method _recurse() and inline it into fromArray()
  • Move common case (content is of type string) to top of switch-block in getSource()
  • Only check strings for illegal characters in setContent()

Here's an experimental patch that uses echo and output buffering to make the getSource() method even faster - it hasn't been tested for side effects, though, so you might want to test it first:)



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES
Unicode
Language
5.9-SERIES

Related

Find related articles by a search for «Performance».