Re: svn: /php/php-src/ branches/PHP_5_4/ext/libxml/libxml.c trunk/ext/libxml/libxml.c

From: Date: Fri, 02 Sep 2011 18:41:22 +0000
Subject: Re: svn: /php/php-src/ branches/PHP_5_4/ext/libxml/libxml.c trunk/ext/libxml/libxml.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, 02 Sep 2011 12:42:26 +0100, Rob Richards <[email protected]> wrote:

I finally got a chance to look at the code. Any reason you didn't just manage everything in a per request state similar to the other global function usage? You might even be able to get away with only initializing it on the first call to setting the loader and you already are performing actions in the RSHUTDOWN so no real additional overhead taking that approach.
Because this setting is different from the others. It's a global setting, while the others are per-thread: http://www.google.com/codesearch#y1w3ejFL0VQ/xmlIO.c&q=xmlCurrentExternalEntityLoader&type=cs&l=3838 http://www.google.com/codesearch#y1w3ejFL0VQ/include/libxml/globals.h&q=define%5C%20xmlGenericError&type=cs&l=335 If I took the per-request approach, a request ending while other were active could deactivate the loader for those active. Additionally, setting this global option means threads with no PHP context will be affected too, so the preloader implementation has to determine whether it has a valid context. -- Gustavo Lopes

Thread (3 messages)

« previous php.cvs (#66162) next »