Tweaking magento for performance

后端 未结 7 2066
Happy的楠姐
Happy的楠姐 2020-12-07 15:26

i\'m looking on performance (server load time) of magento site and i\'m trying to tune search result pages. I realized that when I disabled all heavy things like top navigat

相关标签:
7条回答
  • 2020-12-07 16:01

    This thread is old but very useful. I am adding additional comments for speed:

    1. Instead of using Apache use nginx or litespeed.
    2. Make sure flat catalog is used.
    3. If possible use FPC.
    4. compiler mode to be set on.
    5. Merge css and js(Fooman Speedster ).
    6. Use image sprites to reduce number of request.
    7. Use query cache but avoid size greater then 64 MB.
    8. Remove all modules not in use by removing there xml.Just disabling will not do.
    9. Session to be on Ram.
    10. Use of APC recommended.
    11. Your cron should be run in offpeak hours.
    12. Delete additional stores if not in use.
    13. Delete cart rules if not in use.
    14. optimize image for size.
    15. Use Ajax where ever possible.
    16. CMS blocks take more time then a magento block so unless you want a block to be modified do not use CMS blocks.
    17. Do not use collection count use collection getSize to get what is the collection size.
    18. Minimize number of searchable attributes as these result in columns in flat catalog table and will slow down your search.
    19. Use of Solr search is recommended. It comes with EE version but it can be installed with CE as well.
    20. Minimize customer group as suggested in comment.
    21. Enable compression in .htaccess (mod_gzip for Apache 1.3, mod_deflate for Apache 2)
    22. Remove staging stores if on EE.
    23. Use Apache mod_expires and be sure to set how long files should be cached.In case you are on Apache server.
    24. Use a Content Delivery Network (CDN).
    25. Enable Apache KeepAlives.
    26. Make your output W3C compliant
    27. Use of getChildHtml('childName') is recommended as this will cache block against direct use of block code in .phtml file.
    28. Make sure cron is run so as to clean logs stored in data base.
    29. Number of days log should be minimized as per requirement.
    30. Load cache on RAM if memory permits.
    31. Reduce hard disc file reads and try reads from ram as this is faster.
    32. Upgrade PHP version to above 5.3
    33. If on EE make sure that most pages are delivered without application initialization.Even if one container needs application initialization its going to effect execution speed as apart form URL rewrites most of the other code will get executed.
    34. Check XML for blocks placed in default handle and if those blocks not on specific page then move those XML values from default handle to specific handles.It has been observed that lots of blocks are executed that are not displayed.
    35. If using FPC make sure your containers are cached and repeat request for container is delivered via cache.Improper placeholder definition results in container cache not being used but each time new container content getting generated.
    36. Analyze page blocks and variables and if possible add those variables/blocks to cache.
    37. Switch off Logs writing in Magento.
    38. Remove Admin notification module.
    39. Use of image sprites.
    40. Use some web test tool to analyse number of requests and other html related parameters responsible for download time and act accordingly.
    41. Remove attributes if not needed.With proper care we can even remove system attributes if not in use. 42: If on enterprise make sure partial indexing is effectively used.
    42. Write your own solr search populate to bypass Magento search indexing.
    43. Clean _cl tables or reduce _cl table rows.
    44. I would add into list: try to avoid file cache if possible, replace it by apc / redis / memcache( As suggested by Jaro)
    45. Remove system attributes not in use( Be careful,do a thorough check before removing).
    46. There are some cron tab jobs that are not applicable to all stores so depending on your store features those can be removed.
    47. Optimization by proper attribute management like setting required attribute to yes or is searchable or required in listing etc.
    48. Some observers are not required for all stores so in case those observers are not applicable to a specific Magento site then they should be removed.
    49. Make sure FPC is applicable to most of the site pages. Specially when you added some new controllers to delivering a page.
    50. Magento has lots of features.For this it has many events and associated observers.There are few features that are not used by a store so any observer related to that feature should be removed.e.g : If you check enterprise version there is category permission concept which if not used, then its recommended that on save after events permission related observers to be removed.
    51. If a specific attribute is to be save for a product then instead of call $product->save call a function that will save specific attribute.
    52. In EE version that has partial indexing and triggers modify triggers to avoid multiple entries to_cl tables.
    53. No.phtml files bypasses blocks and use modules or resources directly.As this will result in no caching which in-turn means more work for Magento.
    54. Delivering images depending on device in use.
    55. Some of the FPC recommended for community : Lesti( Free as on date ),Amasty( commercial),extender(commercial ) and Bolt(commercial).
    56. Warming Cache.
    57. Controlling bots by .htaccess during peak hrs.
    58. Pre-populating values in a custom table for Layered Navigation via a custom script that executes daily by cron.
    59. Making sure to avoid unwanted Keys to reduce cache size.
    60. Using a higher PHP version 5.4+
    61. Using a higher Mysql version( 5.5 +)
    62. Reduce number of Dom elements.
    63. Move all js out from html pages.
    64. Remove commented html.
    65. Modify triggers if on enterprise version(1.13 or higher) so as to reduct _cl table entries.As these entries results in cache flushing which in turn results in lower cache hit,hence more TTFB time.
    66. Use Magmi to import products.
    67. Some important links : --http://www.oscprofessionals.com/blog/understanding-full-page-cache-concept-magento/ and --http://dionbeetson.blogspot.com.au/2014/11/magento-performance-tips-for-scalability.html
    0 讨论(0)
提交回复
热议问题