Overview:
domxml does not include a close document routing to release memory after
an xml document has been processed.  I have added one.

Purpose:
I am using PHP's domxml functionality to parse thousands (17,000+) xml
documents in a single request.  The current implementation of domxml in
PHP does not allow for xml documents to be closed, so memory is lost at
more than 7KB/document during processing.  I have been able to reduce
this to 1KB/document by adding a close document routine to the PHP
domxml extension and calling that close routine in my PHP scripts.

Diff:
Please see the patch files for my changes at the following URLs.
http://robertoldham.com/php_domxml.h.php4.diff
http://robertoldham.com/php_domxml.c.php4.diff

http://robertoldham.com/php_domxml.h.php5.diff
http://robertoldham.com/php_domxml.c.php5.diff

Caveats:
Lacking familiarity with PHP development, I am not sure that my
implementation of the close routine is optimal.  However, I have been
using this code change in php-4.2.3, php-4.3.0 and php-4.3.1 for
approximately 6 weeks without any problems.

I am also unfamiliar with the process of getting a change reviewed and
applied.  If I have done anything wrong, or need to do additional things
to follow this through, please let me know.

Thank you,
Robert Oldham



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to