[wp-hackers] Re: Streamlining Includes
Ryan Boren
ryan at boren.nu
Mon Mar 3 07:30:43 GMT 2008
On Sun, Mar 2, 2008 at 11:08 PM, Ryan Boren <ryan at boren.nu> wrote:
> On Sun, Mar 2, 2008 at 10:10 PM, Jacob Santos <wordpress at santosj.name> wrote:
> > This system also totally circumvents opcode caches like APC.
>
> Not totally, but some parts are circumvented. Top loading is
> definitely faster than conditional loading with APC. Most people
> don't have any sort of opcode cache, however. Not loading and
> interpreting a bunch of stuff will be faster for them, even given the
> overhead of conditional loading. At least my half-assed profiling
> awhile back suggested it is faster. Better profiling is needed for
> anything we decide to do, and we need to take into account operating
> both with and without an opcode cache.
>
> Some interesting links discussing conditional loading and caching:
>
> http://pooteeweet.org/blog/538
> http://marc.info/?l=pecl-dev&m=116505905429984&w=2
> http://marc.info/?l=pecl-dev&m=116512075914909&w=2
> http://marc.info/?l=pecl-dev&m=116517663120391&w=2
After reading some more, I'll have to agree that conditional includes
aren't worthwhile. They will result in poorer performance for those
using APC, and those are the people who are most concerned about
performance.
So, let's move the discussion to having plugins do direct includes of
what they need. Would breaking some of the includes into smaller
pieces that could be direct loaded be beneficial? Obviously loading
20 files is not as fast as loading one huge file, but if it means
intrepreting half as much code we might see an improvement.
As for plugins conditionally loading files with an is_admin()
conditional, I don't think this hurts us since plugins are already
conditionally loaded. I guess no plugins get the full opcode caching
treatment. Are there any documents out that tell you how to code for
maximum opcode cache performance?
More information about the wp-hackers
mailing list