Performance Profile of D6 (3 pages)

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
CorniI's picture

This is my GHOP task, for further information look at http://drupal.org/node/196907

The Text from there ;)
For GHOP Drupal-Issue 4 I did a profiling of D6.
The Comp Specs are:
Core2Duo E6320 (overclocked, both Cores 2,24Ghz)
4GB Mem
HDD - don't know :P should be 72000rpm, 8MB Cache or so
Gentoo Linux, Kernel 2.6.21-tuxonice-gentoo-r6 running X
1. Analysis of a fresh installed D6-HEAD (12.09.07) start page after installing (runned cron 1 time manually, please note that the standard page IS NOT saved into db)

Overall stats:
It tooks about 12ms to build the complete page (jep, now it's a much faster Computer :p)

The complete drupal_bootstrap-call took 9,3ms aka ~70%. It called 9 times _drupal_bootstrap. Analysis of the calls will follow. Most of the rest time is spent into the theme-function, 2,9ms (23%), analysis will follow. menu_executive is smart, so don't worry about it (at least here :D)
Analysis of drupal_bootstrap:

Here is the function _drupal_bootstrap_full to mention, here you can focus on, it's consuming ~50% of the execution time(6ms) to execute it's code+calls to other funcs. More then 50% of it's time goes to the modules_load_all aka drupal_load calls. Here you could try to find a timeoptimized version for, but the code is rather short, not too much you're able to optimize. The Calls itself looks smart anyway, but having each call, and imagine having a high amount of modules, it will matter.
Analysis of theme:

The theme-function including it's the other ~30% of the page generation time. It have a big Callstack, and while I clicked through it, I just saw the time goes down with each layer, but I am not able to say THERE it goes. sorry guys. Only recommendation: Think of a ~100lines template engine :p It can have loops and ifs and it should be smart (didn't do a profiling on it)
2. Submitting a new Story-Form

Creating a story consumes 15ms time
Here is nothing really new, differing from the old Computer, all is fine, except from the points talked above, we need ~50% for the bootstrap thing, ~30% for the theme, and ~25% for the menu_executive_active_handler. Tracking down some time loosed in theme(), I came across theme_render_template, it needs 1,3ms without having a call stack, so look there if you want to remove some crappy PHP logic ;)
The other's doesn't seems to be that wasting, but they have a deep call stack you could try to lower
3. Adminindex

I'll just post the additional infos, the rest is like 1.
it needs 61(!)ms to be built, 8,8ms goes into drupal_bootstrap, 3,6ms into theme and 48ms!!!(80% of page generation time) into menu_executive_handler. Now, you sure asks. Why are we loosing that much time for building the admin index? it's 6x slower then the other one's! We start with menu_executive_handler itself. It needs 5,8ms for itself (without calls), his is imho too long. The most other time is spemt into a bug (to my understanding) of update.status-module, 38ms of the total page generation time goes into the function system_status. You don't need to compute your huge array for all modules ecvery time the admin visits the admin index, uh? Just cache the results of the last check (on cron and after adding a new module) and display these on the admin index. It will safe you at least 33ms. Is this an argument? :P I'll file a bug because of this to update_status :)
All other Calls of admin index seems to be ok, no other problems found

For Questions contact me in #drupal or #drupal-ghop, nick Corni or drop a mail(cDOTr1ATgmxDOTde)

The Profileroutpout is attached, strip the .txt ;)

AttachmentSize
profiledata.tar_.gz_.txt108.66 KB

Coding standards

Group organizers

Group categories

Status

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week