Talk:Requests for comment/Better PHP profiling

xhprof at wikia
+1 for xhprof as far as Wikia is concerned. One nice feature of the current wfProfileIn/Out calls is that the data can be collected remotely via the UDP Profiler backend. We are doing some experiments with a similar collector backend for xhprof generated traces so that the data can be aggregated. Unfortunately that's not a built in feature of xhprof... Once those experiments have generated some useful information I'll try to add it here. Owyn (talk)
 * Owyn - Thanks! Any news? Sumana Harihareswara (talk) 00:21, 29 April 2014 (UTC)

Working towards a better Profiler
Some work has begun on cleaning up Profiler under the umbrella of the librarization project. I (bd808) spent some time noodling with the xhprof API and came up with a wrapper class that makes working with the profiler a bit nicer than the raw functionality. Chad has been working on various cleanup patches to make it easier to see what Profiler is doing and get rid of unused cruft. Aaron is planning on taking a look at finding an alternate solution for a couple of edge cases that xhprof is not good at supporting (TransactionProfiler and Parser::braceSubstitution). We will try to dust off this RFC and get discussion on the bigger changes that we'd like to see happen. Ultimately we would like to remove direct wfProfileIn/wfProfileOut calls from the codebase and instead rely on interpreter integrated profiling tools like xhprof. --BDavis (WMF) (talk) 22:21, 6 November 2014 (UTC)

Notes from 2014-11-12 RFC meeting
The idea seemed to be generally supported. Tim was in favor of a plan to remove wfProfileIn/wfProfileOut calls for full function profiling once xhprof works. Sub-function profiling is desired so we could either implement support for a hybrid report or look into upstreaming patches to add a workalike feature into XHProf upstream. This would require working with both HHVM and the PECL module which have separate codebases. --BDavis (WMF) (talk) 22:38, 12 November 2014 (UTC)


 * I found that HHVM's XHProf implementation already provides xhprof_frame_begin & xhprof_frame_end functions which are meant for exactly our sub-function profiling purpose. I have opened a feature request with the PECL XHProf project to see if they would be interested in backporting this functionality. --BDavis (WMF) (talk) 21:36, 18 November 2014 (UTC)