Skip to content

Instantly share code, notes, and snippets.

@astorm
Created Jun 22, 2012
Embed
What would you like to do?
Magento's Performance Profile
There's multiple reasons Magento's performance profile is different
than most "mid-2000s" LAMP stack frameworks and CMS systems.
1. SQL Bottleneck: Magento's functionality is implemented in such a
way that there's a large number of SQL queries on each page request.
Between the special EAV structure of product/category models, and a
general "model first" approach to development, you end up seeing a lot
of SQL queries.
2. "Classical" (Java/C#) style OOP. Magento uses a class heavy
approach to development, and a one file per class architecture to make
development easier. PHP can bottle neck when including this many
classes from multiple locations over the file system, particularly
when each class requires an autoloader calculation.
3. Higher RAM Usage: Magento has several subsystems that use large XML
trees for configuration. These trees use up a lot of RAM. Also,
magento's layout system uses a large number of template files, and
each template file has an associated PHP block object. This consumes
even more RAM. When a system becomes RAM constrained it slows down.
A lot. That's why Magento needs more RAM than most systems.
4. Ecommerce Apps require more state: Stateful web applications are,
in general, slower because they require more INSERTS/writes into the
database/datastore, and need to pull non-cached data more often.
Almost every page in Magento has a bit of stateful information on it
if the end-user is using the cart.
5. Non-ideal defaults: Magento ships with every features ON, and their
default cache strategies aren't the best for every situation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment