[development] More profiling code -- Database queries

Mike Gifford mike at openconcept.ca
Sat Dec 17 16:36:02 UTC 2005


Lobo fired off a note to me asking about CiviCRM's presence in this  
list.  I updated the CivicSpace code to the latest svn version and it  
went away.  The 14M is way more reasonable than the last report.   
Thanks for checking on that..  I generated this more though for  
general performance issues with Drupal.

Unfortunately, the updating the CivicSpace code (plus extra modules)  
didn't drop the number of queries per page below 100.  So is heavy  
use of Caching just required?  Is there any way in a modular app like  
Drupal make better use of resources.  Or perhaps is there a way to  
encourage modules to be more selective when they are called and when  
they call sql.

Also, what is the best way to know which module calls db_query.  Is  
debug_backtrace() the best route?

I modified my patch a bit to cut out the queries so I could see what  
modules were used.  I'm not certain if these are required, but there  
is at least a map of which modules are calling what.

Final memory usage for page 14,468 Kb. Number of modules 53

     * event 1231 Kb
     * flexinode 794 Kb
     * location 760 Kb
     * user 610 Kb
     * mailhandler 509 Kb
     * node 503 Kb
     * massmailer 436 Kb
     * volunteer 358 Kb
     * pathauto 342 Kb
     * webform 337 Kb
     * rsvp 333 Kb
     * filter 324 Kb
     * aggregator 317 Kb
     * taxonomy 308 Kb
     * forum 270 Kb
     * system 243 Kb
     * tinymce 229 Kb
     * image 224 Kb
     * profile 194 Kb
     * privatemsg 191 Kb
     * lobby 181 Kb
     * theme_editor 177 Kb
     * search 176 Kb
     * feedback 174 Kb
     * foaf 173 Kb
     * phplist 172 Kb
     * block 150 Kb
     * echopetition 145 Kb
     * menu 143 Kb
     * statistics 138 Kb
     * node_import 135 Kb
     * upload 132 Kb
     * poll 116 Kb
     * locale 107 Kb
     * target 89 Kb
     * forms 86 Kb
     * civicrm 80 Kb
     * blog 76 Kb
     * path 71 Kb
     * massmailertemplate 70 Kb
     * massmailer_rolelists 58 Kb
     * i18n 58 Kb
     * optin 51 Kb
     * watchdog 48 Kb
     * contact 43 Kb
     * taxonomy_menu 42 Kb
     * throttle 31 Kb
     * notify 21 Kb
     * help 20 Kb
     * page 15 Kb
     * mailalias 12 Kb
     * urlfilter 11 Kb
     * fontsize 9 Kb

<snip>

Queries for page 102. Time for page 8.88
     * session_start
     * variable_init
     * drupal_get_normal_path
     * module_load_all
     * i18n_supported_languages
     * menu_get_menu
     * init_theme
     * privatemsg_menu
     * node_db_rewrite_sql
     * node_page_default
     * node_page_default
     * upload_nodeapi
     * event_is_enabled
     * check_output
     * taxonomy_link
     * flexinode_node_types
     * node_page_default
     * webform_load
     * node_invoke
     * node_invoke
     * node_invoke
     * upload_nodeapi
     * webform_view
     * check_output
     * taxonomy_link
     * node_page_default
     * flexinode_load
     * flexinode_load
     * node_invoke
     * node_invoke_nodeapi
     * node_invoke_nodeapi
     * upload_nodeapi
     * node_invoke_nodeapi
     * check_output
     * rsvp_link
     * rsvp_link
     * volunteer_link
     * taxonomy_link
     * node_page_default
     * node_invoke
     * node_invoke_nodeapi
     * node_invoke_nodeapi
     * upload_nodeapi
     * node_invoke_nodeapi
     * check_output
     * rsvp_link
     * rsvp_link
     * volunteer_link
     * taxonomy_link
     * node_page_default
     * node_invoke
     * upload_nodeapi
     * node_invoke
     * call_user_func_array
     * tinymce_profile_load
     * tinymce_textarea
     * tinymce_textarea
     * drupal_get_path
     * node_invoke
     * echopetition_signees
     * echopetition_view
     * error_handler
     * taxonomy_link
     * node_page_default
     * upload_nodeapi
     * check_output
     * taxonomy_link
     * node_page_default
     * upload_nodeapi
     * check_output
     * taxonomy_link
     * node_page_default
     * lobby_load
     * load
     * load
     * upload_nodeapi
     * check_output
     * taxonomy_link
     * node_page_default
     * lobby_load
     * load
     * load
     * upload_nodeapi
     * check_output
     * taxonomy_link
     * node_page_default
     * lobby_load
     * load
     * load
     * upload_nodeapi
     * check_output
     * taxonomy_link
     * call_user_func_array
     * event_render_day_single
     * call_user_func_array
     * call_user_func_array
     * call_user_func_array
     * locale_get_plural
     * user_block
     * user_module_invoke
     * profile_user
     * call_user_func_array
     * error_handler
     * error_handler
     * error_handler
     * error_handler
     * error_handler

Mike
--
Mike Gifford, OpenConcept Consulting
Free Software for Social Change -> http://openconcept.ca
http://del.icio.us/mgifford/drupal http://flickr.com/photos/mgifford/ 
sets/1178930/
Latest Drupal Launch -> CLC -> http://action.clc-ctc.ca/




More information about the development mailing list