[Expat-discuss] Performance tuning of character data callbacks....
burton at tailrank.com
Fri Aug 1 03:52:46 CEST 2008
How do I increase the size of the buffer used with character data callbacks?
Looks like this is XML_CONTENT_BYTES by my 15 minutes of groking the source
which defaults to 1024.... I might bump this up to 16-32k.
I'm debugging the use of PHP's integration of Expat for parsing of large
Looks like there are two problems that I can see.......
In this case, parsing a 500k XML document takes expat about 200ms..... which
The problem is that php adds an extra 600ms to handle callbacks.
Simply calling empty methods adds another 300ms and using string concat in
php adds another 300ms on top of that.
I think can be reduced by increasing the chunk size of character data which
would both reduce the number of callbacks and reduce the number of string
concats needed by my application.
Location: San Francisco, CA
Work: http://spinn3r.com and http://tailrank.com
Fax: 1-415-358-4198 PIN: 0092
More information about the Expat-discuss