Magento 2 Performance Champion

Today is a good time for a new performance test of the eCommerce Magento 2 Enterprise based website hosted on the Magento Commerce “Cloud”. Site is :

Image for post
Image for post

Champion is an American manufacturer of clothing, specializing in sportswear. The brand is a subsidiary of Hanesbrands, which was spun off by the Sara Lee Corporation in 2006. The company was originally based in Rochester, New York, prior to its acquisition by Sara Lee in 1989.

In 2020 this company migrated to “Innovative” and “high performance” Magento on its “Cloud”. Let's check how it works.

As regularly we will test usually most visited Magento pages:

  1. Category
  2. Product
  3. Search
  4. Cart

Category Pache Champion Magento 2 performance

Image for post
Image for post
Connection Times (ms)
min mean[+/-sd] median max
Connect: 28 34 3.8 35 40
Processing: 2605 3427 493.2 3312 4103
Waiting: 2519 3310 503.1 3256 3984
Total: 2645 3461 490.1 3346 4134

Category Page Magento performance: 3927ms

Product Page Magento2 performance

Image for post
Image for post
Benchmarking www.champion.com (be patient).....doneServer Software:        i-0751db772962a105d
Server Hostname: www.champion.com
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key: X25519 253 bits
TLS Server Name: www.champion.com
Document Path: /reverse-weave-sweatpants.html
Document Length: 280880 bytes
Concurrency Level: 1
Time taken for tests: 2.181 seconds
Complete requests: 1
Failed requests: 0
Total transferred: 281737 bytes
HTML transferred: 280880 bytes
Requests per second: 0.46 [#/sec] (mean)
Time per request: 2180.720 [ms] (mean)
Time per request: 2180.720 [ms] (mean, across all concurrent requests)
Transfer rate: 126.17 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 26 26 0.0 26 26
Processing: 2154 2154 0.0 2154 2154
Waiting: 2106 2106 0.0 2106 2106
Total: 2181 2181 0.0 2181 2181

Magento 2 Product Page performance: 2106ms

Magento 2 Search page performance

Image for post
Image for post
Benchmarking www.champion.com (be patient)…..doneServer Software: i-01862976fb2f11a3c
Server Hostname: www.champion.com
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key: X25519 253 bits
TLS Server Name: www.champion.com
Document Path: /men/tops.html?g=shirt
Document Length: 690157 bytes
Concurrency Level: 1
Time taken for tests: 4.237 seconds
Complete requests: 1
Failed requests: 0
Total transferred: 691014 bytes
HTML transferred: 690157 bytes
Requests per second: 0.24 [#/sec] (mean)
Time per request: 4236.535 [ms] (mean)
Time per request: 4236.535 [ms] (mean, across all concurrent requests)
Transfer rate: 159.29 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 28 28 0.0 28 28
Processing: 4209 4209 0.0 4209 4209
Waiting: 4047 4047 0.0 4047 4047
Total: 4236 4236 0.0 4236 4236

Magento 2 search performance: 4047ms

As we can see Champion not really a champion in Magento performance however it is a regular well know fact about MAgento2. Fast Magento 2 web sites don’t exist. Google recommended page speed is 300–600ms TTFB Magento has around 2000. However, it is a good result some top brands Magento 2sites have 40sec and 200sec page rendering time. It is impossible to write something fast on Magento when the core is sucks. In Adition, Magento Cloud is not cloud just hosting designed by Platform.SH even not for Magento and not by Magento. For drupal and small projects and corporative websites.

By the way, this test is confirming Magento Oficial performance, Dark Paper which officially proves Magento 2 and its cloud really bad performance!

Image for post
Image for post

Magento's official performance is 2661ms per category page which is also really bad for the Modern cloud platform web platform.

In our test, we are 3927ms why it is slow even slower. Because of customizations, each extension uses legacy and slow Magento 2 PHP framework and adds some overhead at least 10–100ms. if you are using 20 extensions you are adding 200–2000ms to the page rendering time. Magento Dark paper test only LUMA theme without extensions test website. Real web sites don't work like that. And yes with the Varnis and FPC and different bicycles like cache warmer. you can hide bad rendering performance however it doesn’t seep up page rendering just helps reduce server resources usage. Good architecture should works even without FPC fast.

Magento 2 migration and the site traffic and user engagement :

Image for post
Image for post

August 10, 2020, Champion announced successful migration to the M2.

What's interesting Magento 2 sales/solution engineers are telling that M2 no needs in fast framework everything ok and performance is slow because it is designed for a faster modern CPU and it works better with updated hardware, however, since Magento 1 releases CPU clock doesn’t change much. Clock rates can’t increase indefinitely. CPU grows horizontally (numbers Cores — good for multiprocessing parallel computing) not vertically (CPU Seed — good for PHP Magento). Single CPU speed improves just 1–5% per year. That’s means that modern hardware can’t speed up API\Page generation time. Magento 2 is slow and with architectural mistakes from Day Zero and its performance is 3–10 times slower than M1 or any modern eCommerce software like Sylius and Shopware. Also, high CPU usage produces a bigger Carbon footprint and produces global warming. M2 makes more dummy operations (Interceptors, boilerplate code generation, Indexers, redundant abstraction) than any known PHP and eCommerce framework.

Image for post
Image for post

What about Magento Frontend's performance?

Maybe Magento 2 has modern frontend technology to work with and which is fast. And here also something went wrong. Magento 2 is a weird mix of the extremely slow backend framework, plus the strange UI front end rendering framework on top of jQuery, Knockout, and RequireJS with PHP and XML configurations that most people don’t necessarily want or need because they want to do their own things with the front end using modern frontend technologies they like.

Meet Magento’s average shop: 244 first party JS files, being 3.2MB. The biggest issues I encounter (excluding third partie widgets), sometimes quite hard to fix because of Magento’s blueprint:

👉 Render blocking resources;
👉 Unused CSS/JS;
👉 Unfortunate resource prioritization;
👉 Deferring the right amount of JS (rocketloader can be used, but you’re actually delaying TTI and LCP metrics, so not most ideal);
👉 Layout shifts due to JS rendering of components (breadcrumbs, sliders, galleries).
👉 Impact on Web Vitals and future organic ranking.

At least one lesson I guess: know what you are up to, and get it addressed in time.

Under such circumstances, PWA could be a solution. Be aware of its challenges as well though. Performance and positive SEO impact often won’t come out of the box, no matter your platform/tech stack:
https://lnkd.in/dS4mWkq

Magento 2 heavy in JS, have suboptimal TTFB and won’t give optimal pagespeed/Web Vitals results out of the box. PWA could be an obvious step forward, one would think.
I do worry about PWA though, because:

- API-calls / data fetching have high TTFB (because of slow legacy Magento 2 framework)
- Smartphones have CPU limitations compared to desktop, but we still ship quite some CSR / JS to those devices;
- I especially see high perceived performance (FCP + LCP + SpeedIndex) and layout shifts (CLS) within the average PWA solution.”

M2 is using request — response model, but M2’s bottleneck is that beside doing server side rendering, it is adding way too much initial JS as well (actually making PWA worth considering).

I guess M2’s issue is that its first release was planned for 2010/11. As responsive design had yet to get traction, M2 never anticipated on mobile usage / mobile CPU boundaries.

Although beta version was released in 2015, they never chose to change this, making it heavy on server side as well as client side and by now making other e-commerce solutions such as Shopware AG en Sylius real on-premise competitors.

Erwin Hofman (https://www.linkedin.com/in/erwinhofman/) - web site performance advocate

Unfortunately smaller companies like Sylius, Vue Storefront don’t have a lot of money to make propaganda like well-established Magento can do to sell legacy and slow solutions.

Let's return to the Champion Magento web site frontend performance.

Mobile Magento performance :

Image for post
Image for post

Desktop Magento performance :

Image for post
Image for post

Content breakdown by MIME-type

Image for post
Image for post

1,87 MB of JavaScript to download and 6,77 MB of JS to compile and execute. 1,252MB of CSS delivered with the page.

If your JavaScript dependencies are plentiful and poorly managed, then your application’s performance will suffer. Your users will have to wait longer for objects to render, which is especially annoying for mobile users with limited bandwidth and CPU.

Magento core and 3-d party modules Libraries dependencies add a lot to loading times, so strive to keep their use to a minimum, and avoid them entirely if at all possible. One way to reduce your dependency on external libraries is to rely more on in-browser technology and rewrite legacy Magento JS stuff. And for this, we have created a Magento 2 ReactJS hybrid solution without the PWA Studio redundancy. Just use React as you want!

Image for post
Image for post

Thanks for reading. Happy Magento performance speeding!

Written by

Magento/APP Cloud Architect. Melting metal server infrastructure into cloud solutions.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store