4

I would like to see how long plugins take to load, as well as other aspects of the page (loops and database requests).

My webpage can take ~2-3 seconds to return the initial request. It seems high and I'd like to figure out how I can optimize it.

Also, as I understand it, every plugin is loaded on each request (even if it's not loaded for that page). Is this true? And if so, why is this the desired behavior? If a plugin is performing poorly it can bring the entire website to a standstill (this just happened to me: Website taking 30+ seconds to load).

2
  • Please don't use meta tags.
    – nicael
    Commented Oct 15, 2014 at 17:59
  • Ah, thanks for letting me know! I didn't realize that tags had a functional purpose (for anyone else who sees this: I had the "feature-request" tag incorrectly on this)
    – Jason D
    Commented Oct 17, 2014 at 5:38

1 Answer 1

4

If you enable devMode, then database profiling information (number of queries, SQL executed, execution time, etc.) as well as PHP script benchmarking information for the request will be output to your browser's console as well as the craft/storage/runtime/logs files.

Also, as I understand it, every plugin is loaded on each request

Installed and enabled plugins are initialized on every request. The only time what you are describing is a problem is if a plugin is doing some time/resource intensive operation in it's init() method, which is generally considered bad form.

1
  • 1
    Ahh, thank you! I went through and was able to find a few pain points and get the request responsive time down to 400-500ms. I was missing a couple big caching opportunities. This is much better! Great!
    – Jason D
    Commented Oct 5, 2014 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.