Joel
Joel

Reputation: 895

What is the fastest way to find the bottleneck/optimize Magento?

Is there a way to identify quickly a faulty script in Magento that slows down the server?

Magento has something like 35 000 files, so there are so many places it can go wrong, I just need a way to find quickly where to optimize.

For example, could I install a script that would tell me all the files magento reads before outputing a page? And then tell me how much time it takes for each file to execute?

Thanks for your help

Upvotes: -1

Views: 1989

Answers (3)

Use any online PHP profilers like these ones:

  • Tideways
  • New Relic
  • Black Fire

Magento has a built-in profiler but its features are limited.

Once you hook it up with a profiler, analyze callgraphs to see if any function calls are slow.

You can always try and do a 3rd-party extension audit. From my experience, 90% of all performance issues come from some custom plugin. Try turning them all off and see if it makes any difference. If it does, turn them back on one by one and find that abuser(s).

Upvotes: 0

Fiasco Labs
Fiasco Labs

Reputation: 6457

There's always Magento's built-in profiler. It's a configuration change and a file edit away.

Enabling Magento Profiler

Upvotes: 0

rightstuff
rightstuff

Reputation: 6532

xdebug and WebGrind will profile your application.

Though it can be a bit tricky to set up, so I'll just post my configuration and you can take from it what you can (from my WampDeveloper installation)...

php.ini

[XDebug]
zend_extension = "D:\WampDeveloper\Components\Php\ext\php_xdebug.dll"
xdebug.profiler_enable = 1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/WampDeveloper/Temp/xdebug"
xdebug.trace_output_dir = "D:/WampDeveloper/Temp/xdebug"

Webgrind's config.php

static $storageDir = 'D:/WampDeveloper/Temp/webgrind';
static $profilerDir = 'D:/WampDeveloper/Temp/xdebug';

Upvotes: 4

Related Questions