Magento – performance/optimalisation
Marek Borzęcki
• Serwer Gearman – it allows to process
asynchronically and synchronically
• FACT-finder – advanced search engine
• Cacheing on many levels
• Clients in 2 types: OPEN and PARTNER
Sklep.tim.pl –elektrotechnical stuff
Conquer the 5 Most Common Magento Coding
Issues to Optimize Your Site for Performance -
Magento Expert Consultin Group
Magento Expert Consulting Group
Top 5 Magento PHP code performance
lSpurce:
http://Conquer_the_5_Most_Common_Magento_Coding_Issues_to_Optimize_Your_Site_for_Performance.pdf
WRONG
OK
1. SQL queries inside a loop
1. SQL queries inside a loop ...
larray of Magento
lproducts
l12 GB RAM
l16x Intel® Xeon® CPU
lrunning at 2.40GHz
lPHP 5.3.19
1. SQL queries inside a loop ...
1. SQL queries inside a loop ...
2. Loading the same model multiple times
WRONG
OK
2. Loading the same model multiple times ...
3. Redundant dataset utilization
WRONG
OK
3. Redundant dataset utilization ...
WRONG
OK
3. Redundant dataset utilization ...
WRONG
OK
4. Calculating the size of an array on each iteration of a loop
WRONG
OK
4. Calculating the size of an array on each iteration of a loop ...
larray of Magento
lproducts
l12 GB RAM
l16x Intel® Xeon® CPU
lrunning at 2.40GHz
lPHP 5.3.19
5. Inefficient memory utilization
WRONG
OK
• Some operations are done with SQL
eg. Via WHERE or JOIN
• die() oraz exit() – unexpected system
behavior
• It is not allowed to use business logic
in PHTML
Others
• Always put attention to the critical parts
of code
• Think clearly and use reasonable
arguments
• Think in advance
Summary

Magento performance

  • 1.
  • 2.
    • Serwer Gearman– it allows to process asynchronically and synchronically • FACT-finder – advanced search engine • Cacheing on many levels • Clients in 2 types: OPEN and PARTNER Sklep.tim.pl –elektrotechnical stuff Conquer the 5 Most Common Magento Coding Issues to Optimize Your Site for Performance - Magento Expert Consultin Group
  • 3.
    Magento Expert ConsultingGroup Top 5 Magento PHP code performance lSpurce: http://Conquer_the_5_Most_Common_Magento_Coding_Issues_to_Optimize_Your_Site_for_Performance.pdf
  • 4.
  • 5.
    1. SQL queriesinside a loop ... larray of Magento lproducts l12 GB RAM l16x Intel® Xeon® CPU lrunning at 2.40GHz lPHP 5.3.19
  • 6.
    1. SQL queriesinside a loop ...
  • 7.
    1. SQL queriesinside a loop ...
  • 8.
    2. Loading thesame model multiple times WRONG OK
  • 9.
    2. Loading thesame model multiple times ...
  • 10.
    3. Redundant datasetutilization WRONG OK
  • 11.
    3. Redundant datasetutilization ... WRONG OK
  • 12.
    3. Redundant datasetutilization ... WRONG OK
  • 13.
    4. Calculating thesize of an array on each iteration of a loop WRONG OK
  • 14.
    4. Calculating thesize of an array on each iteration of a loop ... larray of Magento lproducts l12 GB RAM l16x Intel® Xeon® CPU lrunning at 2.40GHz lPHP 5.3.19
  • 15.
    5. Inefficient memoryutilization WRONG OK
  • 16.
    • Some operationsare done with SQL eg. Via WHERE or JOIN • die() oraz exit() – unexpected system behavior • It is not allowed to use business logic in PHTML Others
  • 17.
    • Always putattention to the critical parts of code • Think clearly and use reasonable arguments • Think in advance Summary