[pLog-svn] __autoload very slow ...

Mark Wu markplace at gmail.com
Mon Oct 8 05:57:44 EDT 2007


I just check the code, there are several stuffs will impact the performance:
 
1. The order of folders:
    - If the file is locate in the last folder, then the autload have to
check all the folders
 
2. The number of folders:
    -There are about 110 folders in the folder list array.  I think it is
too much folders for autoload
 
3. The file I/O
    - It seems the file I/O under windws is much worse then Unix/Linux, that
why Oscar feel no big difference with autoload.
 
For adapt the new autoload feature in lifetype with such big quantity of
folders, I think we should try to use the same skill we used in script
checks.
 
To generate a $include_script[$key] = $value; file for autoload.
 
Then we just use array_key_exist to check the $key exist or not. Then
include the file.
 
It will save a lot of time.
 
Mark


  _____  

From: Mark Wu [mailto:markplace at gmail.com] 
Sent: Monday, October 08, 2007 5:36 PM
To: 'LifeType Developer List'
Subject: RE: [pLog-svn] __autoload very slow ...



I forgot to say this is the result of admin.php?op=newPost
 
You can see there are over 7700 function call of file_exists().
 
If each file_exists call() takes 1 ms. It will takes 15 seconds ..
 
It is so amazing.
 
Mark


  _____  

From: Mark Wu [mailto:markplace at gmail.com] 
Sent: Monday, October 08, 2007 5:23 PM
To: 'LifeType Developer List'
Subject: RE: [pLog-svn] __autoload very slow ...


Hi All:
 
I just attached my profiling file and the result with wincachegrined. You
can see the bottle neck is in file_exists.
 
It takks about 12 seconds.
 
wow ...
 
Mark
 


  _____  

From: plog-svn-bounces at devel.lifetype.net
[mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Mark Wu
Sent: Monday, October 08, 2007 4:16 PM
To: 'LifeType Developer List'
Subject: [pLog-svn] __autoload very slow ...


Hi Oscar:
 
I just test the new autoload under windows, the performace is very bad under
windows ( apache 2.2.4, PHP5 5.2.3 & Mysql 5.0)
 
In original lt_include version, every request can finished within less 1-2
seconds.
 
But, in new autoload version, every request takes almost 25-35 seconds to
show up the page ...
 
I check the cpu loading, it always in 100%. It seems PHP just try search the
include files recursivelly
 
It is really terrible ....
 
Do I need to do any special setup in PHP.ini for autoload?
 
Mark
 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://limedaley.com/pipermail/plog-svn/attachments/20071008/5ed4a892/attachment.htm 


More information about the pLog-svn mailing list