About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:profiling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:profiling [2017/05/18 13:01] – [XHProf / Tideways] demiankatzdevelopment:profiling [2023/11/27 18:55] (current) – [XHProf / Tideways] demiankatz
Line 1: Line 1:
 ====== Profiling ====== ====== Profiling ======
  
-Profiling is the process of collecting information about which functions are called during program execution, and how long these calls take. It can help identify bottlenecks and inefficiencies in the code. Several options are available for profiling VuFind.+Profiling is the process of collecting information about which functions are called during program execution, and how long these calls take. It can help identify bottlenecks and inefficiencies in the code. Several options are available for profiling VuFind®.
  
 ===== XHProf / Tideways ===== ===== XHProf / Tideways =====
  
-VuFind comes with built-in support for the [[http://php.net/manual/en/book.xhprof.php|XHProf]] family of profilers. [[https://tideways.io/|Tideways]] is a later evolution of XHProf, and it is supported in VuFind 4.0 and later (and recommended for those versions, since the original does not support recent PHP releases).+VuFind® comes with built-in support for the [[http://php.net/manual/en/book.xhprof.php|XHProf]] family of profilers. [[https://github.com/tideways/php-xhprof-extension|Tideways XHProf Extension]] is a later evolution of XHProf, and it is supported in VuFind® 4.0 and later (and recommended for those versions, since the original does not support recent PHP releases). VuFind® 6.1 and later only support the Tideways extension. VuFind® 8.0 restores support for XHProf while also supporting Tideways, due to the revival of that project.
  
 To use one of these profilers: To use one of these profilers:
  
-  - Install the necessary PHP extension ("pecl install xhprof-beta" for XHProf, or follow the compilation instructions on the Tideways site for that product). +  - Install the necessary PHP extension ("pecl install xhprof" for XHProf, or follow the compilation instructions on the Tideways site for that product). 
-  - Install the [[https://github.com/phacility/xhprof|XHProf code from GitHub]] and make sure that xhprof_html is symlinked to somewhere in your web root, while xhprof_lib is symlinked somewhere on PHP's search path. (Note that Tideways uses the XHProf user interface, so this step is the same for both products). :!: Starting with VuFind 4.0, the putting xhprof_lib on the search path is no longer necessary.+  - Make sure that xhprof_html is symlinked to somewhere in your web root. This directory may have been installed as part of the PECL process, but if not, you can get it from [[https://github.com/phacility/xhprof|XHProf'GitHub project]]. (Note that Tideways uses the XHProf user interface, so this step is the same for both products).
   - Uncomment the VUFIND_PROFILER_XHPROF setting in your $VUFIND_LOCAL_DIR/httpd-vufind.conf file, changing the value to the URL where you have set up the xhprof_html directory.   - Uncomment the VUFIND_PROFILER_XHPROF setting in your $VUFIND_LOCAL_DIR/httpd-vufind.conf file, changing the value to the URL where you have set up the xhprof_html directory.
   - Restart Apache.   - Restart Apache.
  
-If these steps have been completed successfully, you will see a link to profiler results at the bottom of every page in VuFind. Note that the output of this profile link will cause JSON or XML-based AJAX requests to fail since it will make those responses invalid. This should not matter for the purposes of testing individual pages.+If these steps have been completed successfully, you will see a link to profiler results at the bottom of every page in VuFind®. Note that prior to VuFind® 8.0, the output of this profile link will cause JSON or XML-based AJAX requests to fail since it will make those responses invalid. This should not matter for the purposes of testing individual pages. Starting with VuFind® 8.0, non-HTML pages will provide the profiling link as an HTTP header instead of an inline link.
  
 ===== XDebug ===== ===== XDebug =====
  
-A slightly more advanced option is to install the XDebug extension, which allows you to trigger profile data collection in a variety of configurable ways and then analyze the output data using a graphical tool in the CacheGrind family. See the [[https://xdebug.org/docs/profiler|XDebug documentation]] for more details. No direct changes to VuFind should be necessary to use XDebug profiling; all configuration can take place in your PHP settings.+A slightly more advanced option is to install the XDebug extension, which allows you to trigger profile data collection in a variety of configurable ways and then analyze the output data using a graphical tool in the CacheGrind family. See the [[https://xdebug.org/docs/profiler|XDebug documentation]] for more details. No direct changes to VuFind® should be necessary to use XDebug profiling; all configuration can take place in your PHP settings.
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
development/profiling.1495112485.txt.gz · Last modified: 2017/05/18 13:01 by demiankatz