[wp-trac] [WordPress Trac] #11559: split HTTP Class and Functions
WordPress Trac
wp-trac at lists.automattic.com
Tue Dec 29 14:10:39 UTC 2009
#11559: split HTTP Class and Functions
--------------------------+-------------------------------------------------
Reporter: dd32 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Optimization | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by jacobsantos):
Replying to [comment:8 dd32]:
> Interesting, I didnt realise that. If you wanted to forcably include it
for caching reasons, that'd be a easy enough work around though. Since
plugins are included inside a if conditional, does that mean something
similar? or are they smart enough to realise it in that case?
Well, I think that is the problem in any case. If the opcode cache
extension doesn't know which path is going to be taken, then well it can
do two things really. It can load the file and cache it where the require
or include is. However, since we are also talking about a loop, I'm not
sure it would even bother, since it would have to break the loop and it
can't do that.
A simple conditional might be okay, but I believe the problem is that with
conditionals, it is unknown when they will come into affect, so if they
cache the opcodes in the file, they'll be keeping extra opcodes that may
not be needed in the next request and slow down execution.
Of course, I could be wrong and they may just store the opcodes per file
instead of all together. I believe PHP executions is to store all of the
opcodes together, so in this case it would be my fear, but some opcode
caching extensions extend the PHP engine further and might be able to do
it per file and per modified time (since given that opcode caching
extensions also keep track of modified file time or just expires the files
after a certain time).
What I do know is that conditionals trip up opcode caching extensions. To
what extent will have to be asked of someone who works on one of them. I
do offer some conjecture until that time.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11559#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list