When is the php code loading to main memory?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All,

I got some problems for php performance.
I have big php file which size is around 70K.
And When i request simple one it is too slow.
So i printed time stamp to find which part is slow.
And i finally found some facts.
When I printed time stamp in a function it takes less than 10 ms.
But When i printed time stamp out of fuction, starting above the
include statement which includes 70k php file, it takes more than 1000

I heard that php code is loading to main memory only one time except
when it's modified.
Only when php file modified it loades the php code to main memory
Is it wrong concept?

only way i can do is to split the big php file to small pieces?
Are there any better solution?

Re: When is the php code loading to main memory?

Quoted text here. Click to load it

The Zend engine trys to work more efficiently by caching parsed code.

Quoted text here. Click to load it

You need to profile your code to see what code you regually use and what is
only occasionally used. Move the rarely used code into seperate files and
only include then when needed.

You also need to examine your programming to see if you are actually writing
in the most efficent style. 70k is a very big program, are you sure you'd
not be better off reducing some of the code into more generic

Site Timeline