Re: [APC-DEV] IS_INTERNED for apc + zend mixtures
[email protected] (Dmitry Stogov) Thu, 28 Jul 2011 16:15:35 +0400
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
Hi Gopal, Sorry, I've reverted your patches for PHP and APC and committed the proper APC fix. The PHP part of your patch made a significant slowdown. (indirect function call is much more expensive than inlined comparison and it's used quite often e.g. on each HashTable update). The APC part of the patch was logically wrong, because it allowed two interned strings for the same data. Fortunately, the real fix wasn't too difficult. It looks like at some point I decided to save a bit more memory by interning class names, but that feature wasn't reflected in APC code. Thanks. Dmitry. On 07/28/2011 02:42 AM, Gopal V wrote: > On Wednesday 27 July 2011 01:22 PM, Rasmus Lerdorf wrote: >> On 07/27/2011 01:12 PM, Gopal V wrote: >>> We probably need an override for that so that we can nest multiple >>> interned blocks which are non contiguous between different modules. >> >> Gopal, can you come up with a suggested override patch for the engine >> and we'll get it committed before the alpha-3 release next week. > > Updated patch for the cases which check IS_INTERNED before interning > is initialized. > > http://notmysock.org/code/zend-is-interned2.patch > > + > > http://notmysock.org/code/apc-string-intern.patch > > Cheers, > Gopal