- Ron Peled
Total Posts: 18
There is simply no ways around it: Magento is super slow. The main reason for this speed is its complex and overly architected data structure. I mean to save a new product you are talking about 200+ DB transactions, not including table locking… The only way to speed it up in its current form and current version is by turning caching WAY UP all around: Apache caching, PHP caching, browser caching, and DB caching.
I really hope that Magento is working on solving these issues because it may just be Magento’s achilles heel. Here are a few ways I can see how Magento team can actually speed up their product:
1. Allow more serious collection operations: for example: getAllProducts(), getAllCategories(), etc. but I mean GET ALL including all its attributes, stock items, etc. Same goes to the setAllProducts(), etc. I looked at the current collection structure and when you have a collection of products and run collection->save() all it does is go through each product and saves it. ok, this is great theory but bad practice. Modern DB’s are much faster when you give them all the instructions and data and have them do it for you.
2. Simplify Attribute Engine - yes, it is great that you have 5 tables for each entity or option but is it necessary? are you saving space? performance? none! just add another column ‘text’, ‘int’, ‘varchar’, etc to each record and you are done. Yes, waste space for each record but you will still save speed and space long run.
3. When saving multiple products, categories, attributes (at least when you eventually will implement it...) lock the whole operation as one, not the individual transactions.
4. Open easier and more direct access to your DB model, at least for the read operations. Many times I need to load a product, i.e. Mage::getModel(’catalog/product’)->load($outOfStockProductId) and it brings the ENTIRE product into memory I change only one attribute, like product price and save it. Why would I need all the rest of the data? inefficient.
5. This one will not solve any speed issues, only my headache - offer better documentation. Truth is, for developers you don’t offer much. I spent more time reverse engineering your product than any other. You have pretty code but please, document it as well!