Load In The Loop: Episode 18 – IET Labs Inc.

Jordan Griffey

July 10, 2020
Load In The Loop: Episode 18 – IET Labs Inc.

Load In the Loop: Episode 18 is here! Join Eric Hileman and Ivan Chepurnyi as they identify and fix some performance issues for IET Labs Inc, an online gardening store. What will they find? Can they fix it?

Sponsored by blackfire: https://blackfire.io/

Follow us on Twitter! https://twitter.com/loadintheloop

Ivan: ivan.chepurnyi@ecomdev.org, @IvanChepurnyi
Eric: litl@magemojo.com, @ericvhileman

https://youtu.be/V7TsdQdjt2Y

Table of Contents:

00:19:30 saving a product when using redis clears product cache
00:23:00 composer nwdthemes revslider curl
00:24:00 composer patch to hard code version (or remove extension)
00:26:00 theme editor using view configuration file should be cached in redis
00:31:00 composer autoload not optimized
00:36:00 ietlabs instantquote 13,500 database queries on product page!
00:40:00 252 configurable products LITL
00:42:00 indexer to create separate table for product data in quote tool
00:43:00 amasty pagespeedoptimizer switch to magepack
00:46:00 magento core issue
00:48:00 swissups easytabs accessing version of itself
00:49:00 nwdthemes revslider called but not used on product page
00:50:00 configurable product get product by attribute
00:59:00 likely can disable msi modules
01:05:00 request a quote tool not filling in the product in firefox linux? Looks like happens due to latency/timing.

Transcript

Ivan Chepurnyi: [00:00:00] Hi, Eric, how am I doing? 

Eric Hileman: [00:00:03] I’m doing good, man. How about yourself?

Ivan Chepurnyi: [00:00:06] Yeah, doing pretty good as well. Doing a lot of barbecue. Yes. Was doing a lot of barbecue yesterday, today. Doing some interesting stuff with, after Kennan. Maybe heard about it, maybe not. is there a bunch of benchmarking tools, available for benchmark in New York HTP servers?

Is that you right?

Eric Hileman: [00:00:26] Oh, is this the Hetzner instance?

Ivan Chepurnyi: [00:00:28] Yeah. So yeah, I got a 64 core, logical core, right? Not physical and physical. It’s sorted to

Eric Hileman: [00:00:35] that’s. It’s a heck of a deal, man.

Ivan Chepurnyi: [00:00:38] Yeah, like it’s it’s so it’s so cheap and, it’s not good for production use, but it’s good for benchmarking and you know, crazy stuff to try out, like development instance and so on, because

Eric Hileman: [00:00:51] why not get it for production?

Ivan Chepurnyi: [00:00:52] Yeah. No, because he had snare. it, it provides you bare metal server servers. So you have to, install everything yourself on the server. So you have to install operation system. Everything is, they provide some kind of for firewall around your server instance. But still like you don’t have real fail or like you have to be really good technician in order to organize a fail or for all those services.

So you have actually to create a couple of servers. you have to create

Eric Hileman: [00:01:22] instance

Ivan Chepurnyi: [00:01:22] Docker, Kubernetes cluster, you know, to connect multiple instances together. So if one fails, you know, like it’s not going everything, out, it was a window. Right.

Eric Hileman: [00:01:36] Interesting. We should put Stratus over there, man. That looks like a really powerful instance for not a lot of money.

Get a bunch of them together. What’s the what’s what’s your other experiences have been like on hetzner? Good.

Ivan Chepurnyi: [00:01:48] actually, it’s an interesting story. Like, when I started e-comm Dell from back in 2010, it was our first experience was health center. So we created our staging server on health snare.

Installed or was there a Linux and everything for developers to be able to test different customer project, but that’s a time. Yeah. There was no such Barbara machines available for this great brace nowadays. Like. This is just a crazy how much, AMD actually disrupts as a server market right now, because like they really keep the, how have gave some great punch for, until, with, this processors, because like Epic CPU, yeah, they just beat until, for the, Bryce per, Per compute power, because like,

Eric Hileman: [00:02:35] I, I think they’re particularly good for NBME because they have all the extra PCIE bandwidth lanes that a NBME can really eat up.

So I’d be really curious to see what Tio is like with them. Azure. Azure has the, the, the, the, what, how do you say it? Epic or

Ivan Chepurnyi: [00:02:59] because they are to be Epic.

Eric Hileman: [00:03:05] Yeah. We’d like to try them out at Azure. AWS has on, but they don’t have them with the NBME. I think it’s the NBME combination that would really make them amazing for us. Anyway.

Ivan Chepurnyi: [00:03:17] And, yeah. Has an adjust provides for you? Is. Bare metals that you can just do I’s force expanded testing, testing out how it works.

And, so far like, I was using as a softer Kennan tool and after Canada, it’s a little simple written, purely in JavaScript, in no JS. So it works quite great. Like it was able to produce, actually more Lord has an, A war where KATU, so we’re gonna do, it’s a sea based library and that’s balanced couple of threads.

And Zen was those threats, as they take a lot of CPU time, because there’s a lot of synchronization between them and a lot of holler hat. I was looking for some load testing tool in rust because in Ross you can, really, Use less CPU. And as the same time, we’ll utilize, all of the available threats on the, your system.

but unfortunately I didn’t find it to legs out, so there was no way to test it out in rust, but, I, I was using  before and I tried it and actually performed quite well. The only problem it’s single strategy. So it has a limit of number of requests we can do per second. And that, Sarah, I, I started my, CSRF, quickie token Ross web application.

I wanted to benchmark it, on that Sarah, how it performs and I hit the limit of a hundred thousand requests per second on the load testing tool. So load testing tool was pushing CPU to 100. One was the CPS and the rest of the CPS was not feeling any load adult.

Eric Hileman: [00:05:04] So 63, eight colors.

Ivan Chepurnyi: [00:05:07] Yeah. So for sure colors, basically like was a CSR out, a token going to rate her, probably can handle a lot more load.

And now I’m working a little bit, I’m working on, A small JavaScript libraries that will actually create, multiple, forks. we kind of just sings, like it will grade a fork of each of the after Gannon processes and Zen, it will just, aggregates the results back and what would have done your  across all the fork processes.

So instead of, you know, like, Being limited by a 100 requests per second on how it falls into requests per second to you will be limited by the number of actual course. You have, multiplied by a hundred requests per second. So it’s going to be much more easier to perform a test, legs, that and to, yeah.

Is this a sound stuffing? It. Interesting what I’m working on right now. and I also did some tests for. Was a speech P thing, you know, like, I was doing a tweet last week about the BHP eight and GTE. And,

Eric Hileman: [00:06:22] there was a tweet blew up and

Ivan Chepurnyi: [00:06:24] blew up, but, yeah, it was just some rough desert I was running and people just assumed that it was completely, you know, unbiased benchmark.

and it was just one of the desks RANTES. I just was excited about it and I just posted it in line. And then a lot of people started to ask ya, how do we replicate it? yeah, what’s the technology you use and so on. So right now I’m working on replicatable tests and I was running one of them and, we.

Original desk was running, was worker and was worker. Actually I found out like there was a lot of overhead, there was a worker that actually overwhelms your machine before it actually reaches, you know, so request thresholds and after Canon, you actually can have a very interesting mode. Like you can set.

Hey, I want to execute, let’s say 1 million requests. And Zen after Ken will tell you in what period of time, your server processed all this 1 million requests. And, from intermediate results, it looks like, yeah, you can process one meat, one meal and request in 35 seconds. And without G it’s around 50 seconds, something like that.

So it’s almost a health, like it’s not exactly health, but almost, and this was. Kind of exciting because promising, yeah. It’s not promising for regular web publications because like when you have just regular BHP process, is that it gets dark at, it would take much more longer time actually to compile this PHP process to assembler and Zen, Ron, this assembled golden CPU, you can use some kind of guessing, but steel.

It’s not a really good for. Versus a dye because, assembler is only good for a one granting, processes that, all the time acts as the same function. And in case of, as in harness PHP, like boxing HTTP requests is kind of nice feature to be able to offload to assembler and then assembled just directly gets executed on the CPU.

And, it’s much more foster. So it’s kind of interesting, thing to play around with, and it looks very promising similar

Eric Hileman: [00:08:53] to what Sergei was doing.

Ivan Chepurnyi: [00:08:56] not at all was swole so different. swole is kind of a C extension. So you have to compile it. You have to have it on the server together with your PHP thing and G it it’s completely different beast.

it’s native BHP. Oh, it was a box. So some things that you’re trying

Eric Hileman: [00:09:13] to Sergei, he needed an extension and to rearchitect a lot of Magento, what’s required to get shit and running and PHP eight with Magento

Ivan Chepurnyi: [00:09:23] in general, like what surrogate. It is kind of nice because, Like right now you have BHB FBM, right.

And in PHP, FPM, Magento gets started for every single request. So like you, you start Magento application and only then use acuity actually control controller. So what he did, he created, an FBM of Magento application itself. So let’s say you have four 50 Magento instances running and. instead of, you know, like, Doing this processing for every, I didn’t always implementation details, but what I expect, what he did.

Right. Because as he explained, like he’ll floated his application bootstraps. So it means like that Magento application is initialized, owns a startup or a small server. And then, it peaks one of the available applications. Itself to renders that request. It’s still a booking application. So it’s not going to have the same benefits as writing a completely non-working application or an API in a nonblocking way where you just don’t wait for IO to happen.

In that case, you’re still limited by the number of applications you have started, but it saves a lot of time, on actual, A response processing. So every single, request that you’ve sent to category page or product page, it doesn’t involve reading Magento, configuration files and so on. Okay. What’s the way just caressed.

It’s just weird.

Eric Hileman: [00:11:07] Okay. So yeah, that was around creating persistency.

Ivan Chepurnyi: [00:11:11] Yeah.

Eric Hileman: [00:11:12] Cause swill needed persistency, but if you have a JIT just in time, compiler, you no longer need persistence. Right. So you don’t have to do because you’re compiling just in time. Not. Pre for everything.

Ivan Chepurnyi: [00:11:28] So as it was a problem, we just want to, like, you cannot optimize Magento just by using Jude was out, you know, like having unblocking application, but it goes effectively, Requires you to compile some functions to the assembly code.

And this assembly called, probably will leave in each of the FPM processes memory. So it’s not going to be in shared memory storage. B-roll I don’t know the implementation details of how it works in BHP, but I don’t expect that it’s going to work in any difference. And for instance, a  or. I was at all languages like by some and so on where as the duties are available already.

And in general, G is. There’s the next level of optimization over the opcode cash. So you have, the op cash, Magento or sort of BHP, extensions that already does, compilation of the PHP code into. As a byte code that gets executed by PHP VM, by this is takes and another step by eliminating VM from this logic.

However, you cannot have a large buffer size because all the assembly code needs to be in memory. And when you have the process that just executes and dies as the assembly code may be changed between the runs, you know, You can’t reliably be sure that, the assembly code is different and there is not really much you can gain from purely IO bottleneck application, like let’s say Magento or WordPress or anything else.

If you, if you have a blocking application G doesn’t help you because  yeah. Optimize CPU time. Like, yeah. If, if you have, let’s say a BHP process that, iterates over 1000, array items and to let’s say calculate to some in some peculiar way, Zinnia GT will help you with the performance because it will be a compile assembly code.

However, Those kinds of applications. They’re very rare, but in case of non-working applications, this is actually quite the opposite because in non-working applications, when you wait for IO to happen, you process as a request. So actually your CPU time is the biggest bottleneck in a obligations and unblocking application.

Sorry. So this is kind of interesting, things that’s happening and it looks very promising. For the speech.

Eric Hileman: [00:14:11] Yeah. Yeah. Cool. Should we do the intro?

Ivan Chepurnyi: [00:14:15] Yeah. Why not?

Eric Hileman: [00:14:17] Okay. Loadithe Loop is sponsored by black fire.io, I’m Eric Hileman, CEO, and cofounder of MageMojo Magento hosting out of New York city. The purpose of this program is to take some of what we learned over 10 years of Magento specific hosting and evaluate one of our customer stores.

We’ll share with you what we find in hopes that it may help improve your Magento skills and the performance of your Magento stores. Along with me on this trip is my cohost Ivan.

Ivan Chepurnyi: [00:14:41] Hi, my name is Ivan. I’m a performance consultant for Magento web trips out of the Netherlands originally from Ukraine. now I’m here together with Eric.

We’re gonna look at one was a customer as I think one of the oldest customers of MageMojo. And, Eric Joji. Yeah. tell us, Eric, little bit about this customer, what customer sells scent. Yeah. What’s your story? Who is? yeah,

Eric Hileman: [00:15:07] one of our oldest, I, I, at one point I knew every customer who was here and I still remember this one.

they, it. At least 10 years old, with us, they do electrical equipment and I’m not an electrical engineer. So I don’t really understand how these tools are used, what it looks like a lot of measuring, like impedance and decadence and resistance and all of that fun stuff with electricity, like commercial lab, grade, or industrial type applications.

So they have, C they have a fun mix of extensions here. I think the usual offenders list, and some problems after upgrading the Magento 2.3, which I think is pretty common chasing MSI.

Ivan Chepurnyi: [00:16:00] Yeah. So, allez, they would dip into the customer stores and, a quick, question. So they also manufacturers those devices as well as themselves. Right. So

Eric Hileman: [00:16:10] they are,

Ivan Chepurnyi: [00:16:11] there we go. We go say Caesar devices on the home page, like, cause there’s a logo on every device and so on. And so kind of interesting.

Yep. So Ozzie B2B or B to C I think B to B, right?

Eric Hileman: [00:16:22] I, I, yeah, I would think B to B. I’ve never seen any electrical parts like this interesting stuff, but I don’t think you’ll find any event in your home.

Ivan Chepurnyi: [00:16:33] So let’s do some profiling. yeah, let’s right away. Disable, aggregation and late just profile request here and let’s see what’s going to happen.

do you know who was there use a warmish or, they use regular already. SFPC

Eric Hileman: [00:16:53] I’m not sure. Let’s see, having in my notes here.

Ivan Chepurnyi: [00:16:58] Oh, we’ll see it in a couple of more months.

Eric Hileman: [00:17:02] Yeah.

Ivan Chepurnyi: [00:17:06] A couple of days ago, I saw some posts on LinkedIn and, some developer was telling that, Magento FPC was ready. This is very bad because it, clearest all’s, products. yeah, it’s when you save a product, let’s say it’s clear, older way to records. Which let’s say follows us all for requests to this.

And this is kind of interesting because as far as I remember where this is not recommended for using it in production, and usually like you should use varnish. And that’s why I all the time ask if he was a use varnish, because varnish is a wary. high performance, high performance, cleaning and Apple Academy because you don’t have to, iterate through every single record to have in cash and varnish.

It happens on cash access, not on a cash, ban. So you just grade the least of frequency.  checks, Hays easiest record band. If not Zen. And I’m going to start from cash. If it’s bent, I’m going to request new version from the backend. So this is kind of interesting

Eric Hileman: [00:18:15] since you’re saying so redness isn’t. This wasn’t recommended for production.

Is that in writing somewhere? I don’t, haven’t seen that.

Ivan Chepurnyi: [00:18:22] I think if you go into, I’ve heard that actually, I think if you go into admin panel and when you check as a dropdown, where I’ll use for red is if you, if you have, the default, gash type, it probably will show you a warning. Like. It’s not recommended for production.

You should use warnings for production. At least I remember it. Wasn’t early versions of Magento, for sure. Maybe the remote was right now, but, I definitely remember like, yeah, it was a recommendation through Squamish.

Eric Hileman: [00:18:53] A lot of our customers don’t use varnish. I mean, I think they want to, and they would, they just don’t get at working for one reason or another.

Ivan Chepurnyi: [00:19:00] Whether like, if you already have a sample, which cash are working, like. Changing them into our niche is just changing the food page time. Like if you have a problem, let’s say with. why aren’t fish? It means maybe you are doing something, severed aside. Maybe we, you have some dynamic bars, is that leak some information about the customer they have it’s gets crushed.

But

Eric Hileman: [00:19:26] yeah, I don’t, nobody has problems using Radice, but far Nash state really struggle. I think they just get stale data and run into issues that they can

Ivan Chepurnyi: [00:19:36] Oh yeah. But bigger because varnish requires proper configuration of the batting process. You have also to modify your end of that BHP in order to make sure that, as HTTP cache gets flashed in varnish.

Because there’s this ramping, Justin . What do you also need to configure Magento to tell, Hey, Magento, here’s my varnish settler to which you can send your bond requests.

Eric Hileman: [00:20:04] Now, even, even when we set that up, man, they still have issues with it. W we’ll we’ll set that up, but they don’t like the individual requests, I guess, or extensions, maybe some extensions that aren’t clearing it properly or theme stuff they did.

But yeah, no, even when we set it up, they still have a lot of issues with it.

Ivan Chepurnyi: [00:20:23] Yeah. It’s interesting, I guess. Okay. Yeah, because

Eric Hileman: [00:20:29] I wish they’d all use varnish. That

Ivan Chepurnyi: [00:20:32] would be great. Yeah. So this customer is probably using Warners because, yeah, if I was able to use FPC, we would see a slower version of the page being presented here.

Actually foster Russia was a page. Now we see is a two second time to get to read this book. So here is some, I was a common issue with you all the time. It’s related to the composer and here it’s kind of weird one. if you take a look like the roses and w D Ziems or have slider helper, coral, so.

Eric Hileman: [00:21:15] Curl.

Ivan Chepurnyi: [00:21:16] So this is kind of weird, like does a, you know, like sends information about this website on every single page render to their server

Eric Hileman: [00:21:26] license check, licensed check, maybe for page request. Thanks. Starting

Ivan Chepurnyi: [00:21:30] a licensed server check, blah. But here, for instance, you see like say tags is a Magento version from composer again, and this producers, a lot of our hat.

So this customer user needs to patch Magento, get version, or get system package version Massad by applying composer patch to just return a hardcoded version, or they need to remove this check completely, maybe from the extension code, however, who knows. So what happens since this. Girl a helper because it is kind of weird when you have a slider and this slider has some, a coral helper, because usually you don’t do HTP calls.

somewhere else, if you have just a slider extension, so it’d be good red flag, in my opinion, I’m

Eric Hileman: [00:22:24] guessing it’s a licensed check.

Ivan Chepurnyi: [00:22:26] Yeah. But even if it’s a license check, it shouldn’t happen on the front end. So like, I can understand if you would say  and then you said some flags.

Eric Hileman: [00:22:37] Yeah. I don’t think they people would do license checks like that.

I don’t think they would on a Cron. I think they do it on every page requests. At least that’s what we see when we’re making development copies, and it’s not licensed or we’re making a copy here and it’s not licensed. It’s like page requested it triggers it.

Ivan Chepurnyi: [00:22:53] Or for instance, when you run a sub D I compile, we can do a license check as well.

So

Eric Hileman: [00:23:01] definitely better ways to do it. That’s for

Ivan Chepurnyi: [00:23:03] sure. Yeah. Is there a smarter, more, better way to do it, but when you do it on every page, first of all, like why do you need the Magento version on page rendered time? Like it’s not required for you, especially as the one from composer, like this doesn’t make any sense.

And then why it’s called to curl. And what’s happened since this helper. This is a huge question. And, yeah, there is also some Al so here is actually our first connection through readiness to access some data probably.

And here’s another one. here is some kind of Zim editor and it’s using a Z view configuration file. access. So is this, this also, uncashed so, Oh, I just updated the Mozilla Firefox jazz before our recording. So

Eric Hileman: [00:24:05] this is still crashing.

Ivan Chepurnyi: [00:24:07] So

Eric Hileman: [00:24:07] Latin last two episodes and this one, three ways it was crashing.

Ivan Chepurnyi: [00:24:11] Yeah. And this is kind of weird that it happens. So. Yeah.

Eric Hileman: [00:24:20] So that was the theme editor using view configuration file.

Ivan Chepurnyi: [00:24:25] Yeah, I think it was summary here. Right. So let’s see. Here’s a composer Prolia. Here’s a composer. I’ll say I was zooming in here and then I switched here and here I sold this one. So, cause if you configuration. needs to be, cashed, in the radius. So you can create a plugin around the view config, and then you can just put it into the register cash in order to not read all the files from this file system.

However, it’s weird that you also have this Zim editor because. it doesn’t give me a lot of hope about this, a, functionality, because if you have as editor, it means there is a lot of things going on there. So it was a probably inject some kind of layout, instructions or something like that at the wrong time.

Okay, well, what have we here? Okay. So here is a standard bootstrap process. It seems so was this part okay.

restores this stamp. Great. Okay. So.

Then we’ll take a look here and here’s our homepage. Yeah, there is some slider and this slider has some weird, I O operations here, probably. Sure. Mykonos. This one, I have slide that are out at the creative layer and so on. This is where it slow functionality. Like it takes five, how there’s no second snorer to, you know, like iterate through every single layer of this slider.

And there’s not only one was I’m there a scalpel of them.

At least a collection of products doesn’t, in walk some load and I will put the list if we, as this is a good news about this slider, is there something going on? I can see exactly what is bad here, but I think. Is there some IO happening? Yeah. So is there some IO happening and what exactly it doesn’t show here, but probably is there is some that the base square is related to the slider.

Okay. So here you see, and if we take by the number of calls we see the number of, queries gets executed in the database specifically for this slider. So is this slider produces quite a lot of database operations. And the rest of operations are not that complex about the slide that are one. Yeah. It’s the most time and the most amount of queries, after of course, same as books.

So same as books. These ones are also introducing some issues, but this is standard Magento core issue because when you create a same as ball and you put it in a page, Magentol is every single book separately. So it doesn’t analyze layout for possible. Same as boxing’s there.

So what can we tell here as well? Not really match, right? So there is not much we can do. It’s just the homepage, but we already found a couple of issues with this slider. So as the slides are takes is the most time after, is that, is there a ghost as a composer issues as a composer version file retrieval?

Find file as well. Like they also don’t talk to my composer. afterload as well as you see, they have, around two, 2007, 797 calls to find file and find file and walks, system IO. And yeah, it’s, it’s kind of bad, so they need to adjust their deployment procedure in order to. re reduce, those calls.

They just need to execute actually composer dump dash O and it will be all fine. So let’s go into some page, right? Did we have, have any kind of. Example pages has that they have issues with. Okay. I see one

Eric Hileman: [00:29:17] product pages. Yeah. There’s a couple of example, product pages. So we have complaints.

Ivan Chepurnyi: [00:29:24] Let’s see. Oh, it’s kind of slow.

Even it was out profiler. Okay. So this is a complex product page. JC like you, you can configure. Blue bench, a bunch of stuff here. So let’s run a profile or over here and let’s see what’s going on here. He goes, pro is there some, a load in the loop happenings or because if it’s a configure, or something like, yeah.

Okay.

So this is like a group product with some filters probably right now. Let’s see how it goes. Was it performance? Can we go see, I think I already have a guess. what’s going on Sarah, because probably is there a situation or where all the simple products are sound for exempt?

So it was kind of flung profile. So let’s guess how many good database creators we’re going to have here? I bet on a 1,500. And do you,

Eric, I’ve lost your sound.

Okay. Eric, I don’t hear you, but do you hear me? But I don’t hear you. So something was your mic. Okay. Okay.

Let me also check if it’s not an issue on my side as well. No, everything’s fine here.

Okay, the sound works great on my side.

I still don’t hear you.

Yeah, I hear you now.

Yeah.

Eric Hileman: [00:33:17] I dunno. It’s super weird. Yeah. Okay. I’m going to have to get a new USB deck. I think that’s, what’s been, going bad.

Ivan Chepurnyi: [00:33:25] So what kind of Betty you were placing on number of queries?

Eric Hileman: [00:33:29] Oh, a thousand, but I think you’re probably. Closer.

Ivan Chepurnyi: [00:33:34] I think I’m way off, you know, like this is, this is sounding like,

Eric Hileman: [00:33:39] Oh, Whoa. Oh, wow.

Ivan Chepurnyi: [00:33:42] Yeah. I think they broke all the records on our show.

Eric Hileman: [00:33:48] Well, that’s interesting,

Ivan Chepurnyi: [00:33:50] you know, like it’s asserting Cade other ways queries. So let’s take a look at, what’s actually grown on there, right?

but that is number of operations here. Okay.

Eric Hileman: [00:34:11] That’s a L I T L record

Ivan Chepurnyi: [00:34:15] and yeah, it seems like. Does this get config does a lot of load in the loops. And unfortunately there was a problem with this one, is that Blackfire doesn’t show what actually is happening there because like, is there a, so many things that he just doesn’t show more in detail what’s going on there?

okay. So here it is,

it tests as is get product by attributes

as then it does the product load and probably is there’s a lot of goals like that, or, they get conflict. Yes. So there is there’s good product by attributes. I didn’t know what is the purpose of this functionality? Like how it exactly works, but definitely is there is a huge optimization potential was there because yeah, like it, it is still my database queries to execute and walls.

This process with, getting consequent effect takes like, certainly one second on each product page. So.

Eric Hileman: [00:35:39] This is our own custom thing. It looks like IAT labs,

Ivan Chepurnyi: [00:35:43] maybe a developer did something, but yeah, here is, is it, is it queer? Is it Z use? so it seems like they tried to find all the products. Yeah.

What let’s see what, what the square does sexually.

Eric Hileman: [00:36:03] Yeah.

Ivan Chepurnyi: [00:36:04] So we have, I have to do with value from cuddle products, entity, and war car, and then attribute, this is probably just Z data for product, is it sure? It looks like it. Yeah, just every single product separately. And,

and here’s probably something related to simple products in configurable product as well. Like, so Zara’s at least like, The Honda then to configure a product gets Xs on this specific page. So on this specific page, there’s like 255 and products being used here on this page. And I think this is. Whereas those configurable product products are coming from.

So probably if I click here for instance, on the model, right? So this is one of those models. Yeah. Or this is just a number of simple products of this model. I dunno. But yeah, it is definitely makes sense to take a look at. Zip code base, but ghosts was out code base. You cannot know what actually happened.

So was there because unfortunately it’s hard to tell, but they definitely need to remove this, Lord in a loop because he just consumes, the old page render time.

Eric Hileman: [00:38:05] What do you, what do you think they’re doing? They’re like they’re loading every individual product to get some data from it. The usual product repository, full load.

Ivan Chepurnyi: [00:38:14] Yeah. So is this, this configure model that HTML, and this is probably the renders this, like when you click configure model here, you see all this list of products.

So this is probably what happens when I agree. We’ll probably load every single product here. by sound specific attribute and I didn’t know what happens is there, it just requires investigation by their developers, you know, like really look into it because this is not how it should be done. So it’s in an instant called module.

Eric Hileman: [00:38:56] How, how would you do it? Like load it in a collection all at once. And then,

Ivan Chepurnyi: [00:38:59] first of all, like, I didn’t know what the criteria was there. So definitely it would be some kind of like a single database query that you would perform. If let’s say I need to access some UAV data or filter by some UAV data, I’d create a separate indexer is it will index this data into a single, flat table.

In which I can, for instance, search by those attribute values and Zen, and just load the products by IDs. so I will run a query through three product areas that they need to show. And then I would run another query to actually retrieve the products, actually even not query, but just we’ll use a repository or collection in order to receive Zoe.

So as a product with the required data I need, but here, is there is a lot of product Lords happening.

So, yeah. Is there a 256 product load and 273 collection load? So apart from Kronos loads that are salsa collections, it gets used in order to find the actual products that needs to be shown. So is this this kind of, for a lot of what we’re head and, yeah. Do we have anything else? Is it stands out on this page?

Oh, yeah, the good old friend, Pedro speed. The optimizer. So, just use major bag made pack or

Eric Hileman: [00:40:36] have a shell without an amnesty extension.

Ivan Chepurnyi: [00:40:38] Yeah. But, Here, is there not, is the biggest contributor for performance issues? So here, it was this instant quote that is not that instant kind of a little bit of an interesting name.

So this incense quote actually makes it kind of for do a so. and they have also an Azure product, is it? We can take a look what’s right. Yeah. And this problem was the same kind of problem I expect

Eric Hileman: [00:41:13] probably.

Ivan Chepurnyi: [00:41:16] Yeah. I see the same configure model. So probably if I just run in profile or I probably will see the same issue here.

I just want to go a little bit faster to get, to read some data because probably there is smaller number. Yeah. Is there a smaller number of products associated with it as you see here?

So the first one, we definitely broke a lot of records. This one is some things that you predicted originally. So, so you’re predicting the right amount of queries for this product, but that one, yeah, it was kind of tough. And probably here we can see more in detail what happens, but still. Yeah, it’s the same thing.

Like get product by attributes. well, it’s interesting to see, like what happens here in these get config, mess it, like, yeah, what’s kind of operations are happening. Was there and.

And what can be done here. It requires some investigation by developer to see what’s going on, but in general, yeah. probably we will see it as well here, something related to all patients. Okay. This is as well as they have so many shoes with option provided a four configurable product. So, yeah, they also run into another, issue in Magento core because they’re configurable product has a lot of, configurable options, or let’s say an attribute here.

And let’s say, when you configure a model, right. Every single, resistance. Swell. You hear  right? It’s no, it’s not the resistance. It’s it’s a different, it’s an inductance swell you and airy. Variations of it has an own drop down. Well, you probably an admin panel, like you probably will see like  whereas values.

And when you load these files into failures in a collection, Magento, doesn’t filter out as well as if they’re only applicable to this product. Magento just takes the data for every single while you’re out there. And if Magento would just filter out only four available options here, in order to display the text while you have the selected option, it wouldn’t take.

this amount of time in order to load this data, because it’s like 200 milliseconds only to get this options or even 400 milliseconds. Yeah. So is this is, kind of heavy and it can be optimized by modifying Magento core. here we have also some kind of. Easy tops extension. Is it accesses a version of itself?

for unknown reason? Can you see a form module you list and then get a on module version. I don’t know why they are doing it, but this is not something that you supposed to do. And, yeah, again, it’s the same extension. I think the dosing before as is, would have slider. However, the slider is not available on the product page, right.

So, if you are on product place, you don’t have a slider, but the slide that extension still does a lot of stuff on this page as well. So this just makes sense to, remove it on other pages except the homepage.

And here, what do we see here?

and nothing more. bro, was this, easy to tops and I think it’s the same extension provide the right rev slide. Oh no. So he’s Swiss,

Eric Hileman: [00:45:52] Swiss ups.

Ivan Chepurnyi: [00:45:53] Yeah. It’s something else. Yeah, it’s not, I don’t know, slider. So the have slider it’s from

no, let’s see

it’s and w D Ziems. So do front one. So there’s a lot of interesting extensions here.

Is this option Lauder. And actually it takes Zim most of the time from actually the product load operation. So when you load the product, the time to, access and is a attribute, the options is kind of huge and this is a configurable product, so, okay. So now I see what does a problem. I probably know what they’re doing. So is this just a configurable product? And instead of using a regular configurable drove down, like Magento has our bogs, they created this nice menu to just show older patients because they have a lot of a simple products assigned to configurable and it would say are doing, Zeno, what kind of options are available for affordable options?

They try to access a simple product by using zoos, get product way attributes. And that’s the one produces a lot of database queries. So let’s see, Zack SQL query list.

Yeah, so this is all of the tax data, but

I don’t see is that the query related to get product by

Yeah, it’s kind of hard to see when you have so many queries on a page, but in general. Yeah. It’s possible to optimize this piece of code to reduce it to the minimum amount of time, because here it’s a lot of time spent on generating this one. It’s not good for, hosting and it’s not good also for the customer itself.

Because, yeah, you want to sell products. You don’t want your customers to wait for the page to render on the backend side. And they can imagine like every single time when someone orders, Swan was this product, is it all cash configurable product gets flushed. So yeah, this is kind of a problem as well. men, you have this slope.

When you have this flow product page, this slow product page here. Okay. So here we have a DeGray page. So let’s quickly check how this one works. As I understand, they don’t have a shopping cart, right. They have this request to quote

Eric Hileman: [00:49:31] yeah, that’s a, it looks like.

Ivan Chepurnyi: [00:49:53] Let’s see. Okay. So could they go to breaches nods of the bed? So it was the biggest issues on product pages. I see. And they are using the standard, my CQL search. All right. So they can benefit from elastic suit in this case.

Yeah, they definitely can benefit because this building was a field source takes quite some time. Okay. So is this page can be optimized quite well by Justin’s telling the last six units, like they don’t need to have anything else just to sell the last six years, configure your elastic search. Connection and re index and they’re ready to go.

Right. So there’s nothing else I can suggest. I don’t see loads in the loop census page.

Eric Hileman: [00:50:55] Did you see any MSI issues?

Ivan Chepurnyi: [00:50:58] I think MSI issues are mostly on the product page because when you have, every single product being loaded separately again and again and again, is there a number of queries also, increases a lot.

And you said Z also have FPC warmer, so like say also warm up pages. So, unless is there a warmer, can spout, let’s say follow tons of DCP connections. You won’t be generating cash quite efficiently because like 30 seconds to render a page that is going to be very tough and. They can look at the number of products that they health let’s see.

can I let’s say use some kind of a surgery block

Eric Hileman: [00:51:53] they have shot by in here. I’m surprised we didn’t see shot by.

Ivan Chepurnyi: [00:51:59] I think maybe they have it, but they don’t use it. Okay.

Okay. what’s kind of common, common German will be in maybe AC does it work?

Hmm. okay, let’s go through the homepage. Maybe it will work from the homepage.

Okay. Oh, it’s kind of a full text search with different documents as well. So let’s see.

Eric Hileman: [00:52:47] that’s pretty cool.

Ivan Chepurnyi: [00:52:51] We’re going to do services so Zuora. So this is some kind of a search service being customer service or search. So, is there enough using as a stunned that’s Magento search

search?

Eric Hileman: [00:53:12] Yeah. Wow. I haven’t seen that in a long time where people would use Google site search for their site search Fitbit thing. I haven’t seen that long time.

Ivan Chepurnyi: [00:53:23] Yeah, but

Eric Hileman: [00:53:24] I forgot that was even a thing people did

Ivan Chepurnyi: [00:53:29] want to hear you say don’t use the standard search of Magento. So I think we don’t have anything else to reviews on.

Eric Hileman: [00:53:40] Now. I can’t add a product to the car just to quote, it’s just their, their quote until it’s really. Causing the record, 15,000 database queries. Do you think MSI is adding to that?

Ivan Chepurnyi: [00:53:55] sure.

sure. it’s adding to that, however, Yeah, well, let’s just take a look. Heads. Aquarius was a smaller number of them. So let’s take a assort here and here we see, for instance, is stock channels and went through a stock sales channel and so on. So this are all MSI queries, but, and here, for instance, as well, like stock item.

And so on. Yes. So MSI adds here some, additional load, but only because the product is loaded by ID in the loop. So as soon as you don’t go the product, buy it in a loop. A lot of MSI queries will be reduced as well. So. Yeah. As a first point of a fix for exam is actually getting rid of loading a loop here, and it will solve a lot of latency issues.

And Zen removal was also extensions that a load composer files that iterate through your file system to grab own module version, a fig XOs extension and Zen think about. Hey, can we profile again? It was a black fire. Can we see it? Was there a, still an issue on the product page and then, decide if they need to optimize MSI more, but I don’t see MSI is the biggest contributor here.

Maybe they even don’t use MSI probably if they didn’t use MSI before.

And let’s say they don’t use it right now, because I don’t see that

any kind of gray areas. let’s see, Tuesday do a query on inventory itself in venturing.

no. So it was April. We use only single store inventory, but they seems like they already applied MSI patches. Because I don’t see as, as a do it queer, we’re here to you table. So they are using, here is a standard catalog inventory. They will.

So basically they can even disable MSI modules. If they don’t use MSI, they need to check it of course, themselves. Like if they don’t use multi warehouse set up, was that it’s safe to disable it.

Eric Hileman: [00:57:16] Yeah. So we have, the, the NW themes RevSlider curl call a composer patch to hardcore version, or just remove the extension. A theme editor was using view configuration file, which should be cached and gratis classic composer. Autoload not optimized. And the big offender was the record setting. What 36 was it 36,000 database queries on the product page for the instant quote,

Ivan Chepurnyi: [00:57:47] 252 products.

And I’ll loop searching certain files on 13, five,

Eric Hileman: [00:57:57] 13,000.

Ivan Chepurnyi: [00:58:00] Yeah. So is this just taking the muscles of time on about the risks level?  so mostly they have issues with the product pages it’s as a biggest pain point

Eric Hileman: [00:58:19] yeah. Yeah. Be curious to see if they’re able to rewrite that custom.

Ivan Chepurnyi: [00:58:33] It all depends. It all depends. what they want to show there because maybe as a even don’t need those, get, get products by attributes. Maybe they can just, run a query of all, products that are simple products in stock and just shows them, or was there like. Yeah, this is, there is probably no needs to do any additional operations though.

And especially like, if you take a look at the least Zay, even don’t output prices here. So. You know, like, is there nothing complex? And there are two all the time, like all in the loop, every single product role was a check stock availability.  but you can definitely optimize this part.

Eric Hileman: [00:59:44] I think he was being shot by there. Now that was their own custom club thing. Yeah.

Ivan Chepurnyi: [00:59:50] So here. Yeah. I didn’t know what this one little number does, I guess probably if I click here. Okay. So now

it doesn’t work. Yeah.  so configure a model close to the window and still model number is.

Eric Hileman: [01:00:21] Yeah, try selecting one of them. It just filters it down.

And what happens if you click request a quote from them?

I think that’s getting worse. You have crated or you got updated it and got worse.

Ivan Chepurnyi: [01:00:41] Yeah. That’s what I mean by that. That’s on a case. So you can click some requests cooled. I, it doesn’t pop your way into Mosul number.

Eric Hileman: [01:00:52] No that’s broken. I can check the search too. I think the search was broken on the product page as well.

Do you that, do you have an ad blocker or something that might be,

Ivan Chepurnyi: [01:01:03] I think was automatically blocks the content by default, like it’s Missoula browser, it prevents, Does send that request to Facebook and other social networks by default, but here, but it would show me here is that, each was trying to access something.

It would show

Eric Hileman: [01:01:29] requests for block.

Ivan Chepurnyi: [01:01:30] Yeah. Yeah. But this is production dashboard. It doesn’t show me anything about, yeah, today it’s definitely not from this one. Yeah.

Eric Hileman: [01:01:42] See if that’s broken from me too.

Ivan Chepurnyi: [01:01:52] My name is Aiden and that may be in Mozilla  and there is probably just, you know, let’s see.

Eric Hileman: [01:02:01] Oh, Yeah. Like my product page. If I click on the dropdown that says, choose an option for model number, like I have all the products in it.

Ivan Chepurnyi: [01:02:10] Okay. So for me, if you just tells me, Hey, here is what crushed,

Eric Hileman: [01:02:21] wait, this, this is, this actually took me to the car. You didn’t go to the car. Like you got to. Okay, wait. Yeah, no, that’s weird. So when I’m on a, hold on, when I’m on product, the first link in the chat, H R R S five KV. And if I click instant quote, it loads the popup like you see. And then if I click any of the products on the left,  and I click get instant quote, it, it takes me to the car and I have a product in my car,

so that’s definitely not working the same in Mozilla.

Ivan Chepurnyi: [01:03:08] Yeah. And I see for instance here.

Okay. here, you see it as well. I have a bunch of JavaScript errors in the browser, so

Eric Hileman: [01:03:24] yeah. Yeah. That’s that’s Boston and Sila.

Ivan Chepurnyi: [01:03:28] Yeah. So Firefox users probably unable to do anything with this website. Unfortunately.

Eric Hileman: [01:03:38] Yeah, your search up there was broken too. Didn’t you try to use the search? I mean, yeah, I mean, it’s JavaScript, so it’s probably if there’s JavaScript chairs.

Ivan Chepurnyi: [01:03:50] So is this my problem? Was there a snow model number in a dropdown because I have this a JavaScript error. And do you have any model number and drop dropdown?

Eric Hileman: [01:04:00] I do. I have all the models.

Ivan Chepurnyi: [01:04:01] Okay.

Eric Hileman: [01:04:04] Let me see edge on something.

Ivan Chepurnyi: [01:04:10] I mean, there is some nice Sarah of this customer can use to cross test it in multiple browser or sculpt a browser stack. Have you used it before?

Eric Hileman: [01:04:23] No, I’ve heard of it. I’ve never personally used it.

Ivan Chepurnyi: [01:04:26] It’s kind of a good one. You have a possibility to test in different browsers on the real, machines. So you get connected through remote desktop.

The available one

Eric Hileman: [01:04:41] Oh three. That’s cool at work. So naive or edge for me and Chrome, but not Firefox.

Ivan Chepurnyi: [01:04:51] Web browser

or market share.

Yeah, so Firefox is only 5%. Anyone below 5%, mostly it’s Safari and Chrome. Interesting. If it actually works in Safari, I don’t have Safari on Linux, but

Eric Hileman: [01:05:35] yeah, I don’t either. I haven’t used the Mac for awhile,

Ivan Chepurnyi: [01:05:39] whether I’m currently in the United States, like person of Safari, probably it’s also reports, iPhone users as well into this calendar.

Probably a scan. We can reuse only desktop. Okay. Desktop, the story is different. So in desktop, yeah, Chrome was completely. I

Eric Hileman: [01:06:13] I downloaded Firefox and I think it works for me on windows Firefox.

Ivan Chepurnyi: [01:06:20] It does. It just doesn’t work on my,

Eric Hileman: [01:06:25] so, okay. That’s even weirder.

Ivan Chepurnyi: [01:06:27] yeah. Okay.

Eric Hileman: [01:06:30] Do you have to enable the protections thing or?

Ivan Chepurnyi: [01:06:34] I think it was enabled by default. So you see what, when, when they have some kind of protection, like adjust, notify SMEEs that there is some protections and they both end for their website. Oh. He actually also tells me that the productions are enabled, but

yeah, I think it doesn’t tell me. Yeah,

Eric Hileman: [01:07:08] I, yeah, I don’t, I don’t know why yours will be full of errors and mine. Isn’t

Ivan Chepurnyi: [01:07:16] yeah, I’m just the lucky

Eric Hileman: [01:07:25] I can’t even, I can’t even, see like what version of. Firefox. I just, well, I guess I can’t from the download page.

Ivan Chepurnyi: [01:07:34] maybe it also could be latency, you know, because I was at the websites from Europe here. And is it time for JavaScript to initialize maybe takes longer as in, for instance, in your case because you are in United States and it could be possible.

Yeah, because the errors that I see. It tells me directly that, Hey, like you’re trying to cause this mess up before initialization has started. So there’s some kind of jealous cribs that invoke some Masad. and this mess up this probably somethings that actually they probably have in there. functionality is that yeah, it walks something before something happens.

So probably just because my, connection it’s far, far away from was the website. Maybe it takes longer to get something executed, so it could be a random issue. Is it digest? Get duplicated. So all the time when my give

Eric Hileman: [01:08:44] crumb,

Ivan Chepurnyi: [01:08:45] no, I didn’t install it on Linux fondly, far folks.

Eric Hileman: [01:08:53] That’s a new one.

JavaScript timing, errors.

Ivan Chepurnyi: [01:08:58] Yeah. JavaScript is always a fun thing. To deal with. Okay. So we have, I think enough data for a customer to work on and, yeah, everyone. Thanks everyone. Who’s still watching the show till this moment, deals the next one, right?

Eric Hileman: [01:09:18] Yep. L I load in the loop at Twitter, L I T L at  dot com.

Thank you to Blackfire for sponsoring this

Ivan Chepurnyi: [01:09:26] Blackfire big respect.

Eric Hileman: [01:09:31] Cool. All right. Thanks everyone.

Leave a Reply

avatar
  Subscribe  
Notify of

Ready to get Started?

Sign up now