• Resolved tahtu

    (@tahtu)


    Is there a feature, which profiles the page generation? I would like to see, which part of the generation takes how many time.

    I could use this, to firgure out slow plugins, shortcodes, features of my theme or maybe other things too.

    Often requests will be handled within one second on my local development environment, but sometimes it takes 5 seconds and more. I would like to know, why.

    (I disabled the external HTTP requests, so they cannot be the reasons for it. The database cannot be slow too, since QM shows to me always times less then 0.2 seconds.)

    Maybe an implementation solution could be a mesurement of the executed actions and filters? But for this, I think WordPress have to implement something for that. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    The sort answer is no, this isn’t possible at the moment.

    The long answer is that QM used to include some performance profiling of actions and filters but it could only time the overall time for each hook, which was useless and misleading because the init hook is almost always the slowest, so I removed the feature.

    I have recently been working on a feature which surfaces the timing information for each action or filter callback hooked into each hook, which is much more useful. Unfortunately it’s quite difficult and I haven’t had a lot of time to work on it. Fingers crossed I can find time to work on it again soon.

    QM includes the ability to add your own profiling points via hooks, you might be able to use that if you’ve got an idea of where the problem lies: https://querymonitor.com/blog/2018/07/profiling-and-logging/

    If you want proper low level profiling then you’ll need to look into Tideways/XHProf/Blackfire.

    Thread Starter tahtu

    (@tahtu)

    Thank you John. With your profiling option I can find problems inside my code.

    And with your thoughs about profiling, now I know you understand what people like me wants. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Profiling inside the page generation’ is closed to new replies.