Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
OK debugged the really, really high memory usage in #drupal with Damz and Berdir. Query logging and having xdebug enabled accounts for some of it.
However, with both of those disabled, and no APC, the menu rebuild still takes around 7MB of memory on my system just for itself (out of a total of 32MB).
eaccelerator enabled:
first run Memory used at: devel_boot()=1.64 MB, devel_shutdown()=18.57 MB, PHP peak usage=19.25 MB.
next run and others Memory used at: devel_boot()=0.26 MB, devel_shutdown()=2.86 MB, PHP peak usage=3.5 MB.
Comments
Comment #1
catchOK debugged the really, really high memory usage in #drupal with Damz and Berdir. Query logging and having xdebug enabled accounts for some of it.
However, with both of those disabled, and no APC, the menu rebuild still takes around 7MB of memory on my system just for itself (out of a total of 32MB).
Comment #2
andypostmy stats for D7 + all modules enables + devel (admin/build/modules) windows box (php 5.2.9-2 + apache 2.0.63)
eaccelerator enabled:
Memory used at: devel_boot()=0.27 MB, devel_shutdown()=6.67 MB, PHP peak usage=7.25 MB.
eaccelerator disabled:
Memory used at: devel_boot()=1.82 MB, devel_shutdown()=21.63 MB, PHP peak usage=22.25 MB.
with return; at menu_rebuild
eaccelerator enabled:
first run Memory used at: devel_boot()=1.64 MB, devel_shutdown()=18.57 MB, PHP peak usage=19.25 MB.
next run and others Memory used at: devel_boot()=0.26 MB, devel_shutdown()=2.86 MB, PHP peak usage=3.5 MB.
eaccelerator disabled:
Memory used at: devel_boot()=1.83 MB, devel_shutdown()=17.78 MB, PHP peak usage=18.25 MB.
As I see menu_rebuild() eats near 3-4M for own data
Comment #3
andypostHere the screens of zend profiler (all core enabled + eaccelerator)
pm(*).png - normal d7 core
p(*).png - menu_rebuild() excluded
Comment #4
andyposthttp://drupal.org/files/pm1.png
http://drupal.org/files/pm2.png
http://drupal.org/files/pm3.png
http://drupal.org/files/p1.png
http://drupal.org/files/p2.png
http://drupal.org/files/p3.png
http://drupal.org/files/p4.png
Comment #5
andypostThis with menu_rebuild() skip
Comment #6
andypostAnother series but without eaccelerator
Comment #7
andypostThe most expensive menu_rebuild() because _menu_navigation_links_rebuild()
Comment #8
c960657 CreditAttribution: c960657 commentedThis may be fixed by #550124: Remove prepared statement caching or #496500: Remove global placeholder counter.
Comment #9
moshe weitzman CreditAttribution: moshe weitzman commentedWe also changed menu_rebuild to do many smaller INSERT instead of one gigantic INSERT. Please reopen if there is a real outstanding issue.