Tracking how Magento 2 stands performance wise turned out to be quite a lesson in the area of enterprise software design for us all, especially after seeing how bad Magento 2 beta 3 vs Magento 220.127.116.11 EE performance comparison chart looks like. It's not that I enjoy pointing out flaws in the work other people do, what interests me is how certain design decisions affect how well platform at hand fits the requirements and how to avoid the same pitfalls when architecting my own code. So it's true Magento 2 performed poorly when compared to Magento 1.x Enterprise Edition just couple of months ago, lets see how it performs after seeing much of Magento 2 core team resources directed into that single requirement of increased performance and scalability.Continue reading
General consensus amongst developers playing with current Magento 2 development versions is that is appears to be much slower than Magento 1.x. Unfortunately before the public release of performance toolkit package for both platforms, it was quite hard to quantify performance regression in Magento 2. Performance toolkit was released last year, therefore I did the first benchmark using official tools for my Meet Magento Poland 2014 talk. Performance results were not impressive, but since Magento 2 just started to take shape, that was OK.
Recently I had the privilege of presenting benchmark results for current state of Magento 2 code to significant part of Magento community. In communication with some of the community members, I promised to publish detailed benchmark results, hence this article.Continue reading
It didn't take long after Colin Mollenhour released it's
Cm_Cache_Backend_Redis into the wild for Redis to become preferred cache storage backend in Magento world. With Magento 2 approaching rapidly, it's nice to know that once it goes GA, we'll find our good old
Cm_Cache_Backend_Redis inside. But, since our familiar
app/etc/local.xml has been replaced by
app/etc/env.php, how exactly do we switch cache backends in Magento 2? Luckily not much has changed and basics of switching cache backends is just a matter of syntax, as I'll explain in this article. Additionally, although this isn't proper approach to configuring cache backends in Magento 2, by adjusting dependency injection container configuration, I'll demonstrate how
app/etc/di.xml connects ins and outs of Magento 2 platform.
Before we seriously step into Magento 2 era, please allow me to dissect one more Magento 1 bug. Couple of weeks ago we enabled compilation at one of our client's Magento EE installation as a part of holiday traffic preparations. Goal was to take advantage of performance boost provided by avoiding Magento autoloader through compiling all the Magento classes into several bulky PHP files. Unfortunately things didn't go to plan and we had to disable compilation couple of days later, due to bug in the way catalog product view controller handles 404 forwarding when product exists, but for some reason it isn't viewable (out of stock, disabled, etc.).Continue reading
In my last article on this topic I explained how Magento Enterprise Edition Full Page Cache works, and how to use performance boost it provides at your own controller action. In the second part of this mini article series, I will try to explain concept of Enterprise_PageCache containers used for allowing dynamic behavior for certain blocks, even though page is served from full page cache.Continue reading
Even though I'm in love with the platform, as it turns out, I tend to blog about Magento bugs quite often. I like to believe this is a good thing, because besides helping other Magento developers, finding and fixing bugs makes our favorite ecommerce platform better. It has nothing to do with frustration couple of days debugging session can cause, I ensure you. In this article I'm about to explain and provide workaround for bug affecting all Magento versions (including latest Magento CE 18.104.22.168 at the time of writing), one that's causing catalog price rules not being applied to final price and totals not getting calculated correctly when creating orders from Magento admin, all this under specific and hard to reproduce circumstances. Honestly, this is probably the ugliest bug I've ever seen in my coding career, largely due to fact that client's bug report is usually that catalog price rules prices revert when creating orders from Magento admin, but only sometimes and without any pattern.Continue reading
Routing is an essential part of every MVC, Magento is not an exception to this rule. In order to understand how Magento routing works, it is necessary to get acquainted with execution flow that leads to certain request getting (or not getting) dispatched. It goes without saying that this knowledge comes in handy when you need to explain that 404 being thrown.Continue reading
Since Magento CE 1.3.0 version, creating Magento admin controller required you to specify before="Mage_Adminhtml" or after="Mage_Adminhtml" attribute for your node at
admin/routers/adminhtml/args/modules XML Path, depending on type of behavior you want to achieve. Like me, you probably have doubts on why this is necessary, and what is the background of this requirement? Simple answer would be that without it, it simply doesn't work. More precisely, Magento hits you right in the schnoz with 404 after you try accessing admin controller in question, if you don't set one of these attributes at your node. In this article I'll do my best to explain bug in Magento standard router causing this behavior, one that somehow managed to get packaged with last 25+ Magento CE versions without being noticed.
As a number one open source eCommerce platform with several years of development behind it, I'm sure you'll agree that Magento is one of the most complex pieces of PHP software ever created. Logical consequence of complexity Magento brings to the table is relatively low performance when compared to custom made eCommerce solutions. In order to improve this situation, Magento stacked several layers of caching one on top of another, with full page cache being the topmost layer, and one that's exclusive to Magento Enterprise Edition. Having power of full page cache nearby is great, but I must point out that by creating custom controller action in Magento you don't automatically benefit from performance boost FPC offers. In this article I'll outline how Magento Enterprise Edition full page cache works, and what you need to do in order to take advantage of features it provides at your custom controller action.Continue reading
In my last article I tried to outline Magento way of displaying custom product collection using custom controller action at store frontend. I also made a promise to write a follow-up on the topic covering adding layered navigation to custom controller action with goal of making your product collection easier to navigate. For purposes of writing this article, I'll shift my focus back to Magento extension for managing catalog price rules based sale items, code I originally wrote to demonstrate adding custom layered navigation filter in Magento in one of my previous articles. As a part of this extension, I also created custom controller action used to display only sale items and added the layered navigation to that controller action, something I'll do my best to explain here.Continue reading