Load In The Loop: Episode 6 - PumpProducts.com

Load In the Loop: Episode 6 is here! Join Eric Hileman and Ivan Chepurnyi as they identify and fix some performance issues for PumpProducts.com.

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

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

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

Transcript:

Ivan Chepurnyi: [00:00:00] Hi, Eric. How are you doing?

Eric Hileman: [00:00:02] I'm good. I'm good.

Ivan Chepurnyi: [00:00:03] Yeah. So just a few days  ago we went, didn't release the last episode, but we were already recording new one, right?

Eric Hileman: [00:00:10] Yeah, yeah, I know. And we had audio issues on the last one. I had audio issues on the last one that was a little bit funky,

Ivan Chepurnyi: [00:00:16] but, but, but they real like how Jordan would actually built out , music stuff and so on.

It's so.

Eric Hileman: [00:00:23] Yeah. Jordan's getting into it, man. He does a good job and he's, he's a, he's worked on the MageTalk podcast for a long time, so he's got a lot of experience. Okay.

Ivan Chepurnyi: [00:00:31] So just, start out with the show

Eric Hileman: [00:00:33] Load in the Loop is sponsored by black fire.io. I'm Eric Heilman, CEO and cofounder of MageMojo Magento hosting out of New York city.

The purpose of this program is to show what we've learned from over 10 years of Magento specific hosting and evaluate some of our customers stores. I will share with you what we find and hopes that it may help you improve your Magento skills and the performance of your magento stores. Along with me on this trip is my cohost, Ivan.

Ivan Chepurnyi: [00:01:00] Hi everyone. So my name is Ivan. I am a one off original Magento core developers. Now doing performance consultancy. Uh.Out of the Netherlands, as a single man company helping merchants small and big, I'm actually helping everyone out there. So, today we are going to be one of the MageMojo customers, it was kind of last minute request from a customer, right.

And, Eric tell us a little bit about the customer. What customer is selling. What they are doing.

Eric Hileman: [00:01:34] Yeah, I actually just got this one. It's a pump products.com and the issues, yeah. The issues that they've had are numerous. let's see. We have. Let's see what all they have. They're having a, yeah, a lot of performance.

And, but then other things like, I think, I think it's, I think they're seeing queries locking in the database and they'll see like, so some DB table level locks. and then that would also cause some, some crashes, like, like Stratus is Stratos to texts that your database is locked up in, queries are backing up.

It will, restart. First, first of all, it tries to kill those queries. so it'll detect, okay, this query is backed up, it's locking, it's blocking other queries. Let me try to kill that query. And then if it can't kill that query after a certain threshold, it will actually restart. So, and then that sends a report to the customer that says, Hey, here's a list of sequel queries that were locked up.

We attempted to kill them, we couldn't kill them. So we had to restart my SQL server for you. And then that actually opens a ticket and our help. Desk for our support team to see it, and CCS all the customers who are on that customer's accounts. If your developers are on it, and they're seeing a lot of that, but they're also like the customer report.

Ah, I'll get like a a five Oh two, I can't connect. My cloudfront can't connect. but really it's just a Stratus doing health checks and keeping stores, running. So. So let's say, let's take a look at it and see, you know, see what we can see from Blackfire. Probably be some stuff that stands out to us.

Ivan Chepurnyi: [00:03:17] Yeah. So RO, right. What I can tell you is that, what do you expand to is not the base looks. It's actually requires more deeper look into the, backend processes and seeing what's happening in the background. You know, because, maybe as they have overlapping code jobs or maybe as they have, you know, issues with their importer, or maybe they, Elan.

Are not using Magento. You'd with updates on schedule mode. So a lot of issues there is that, is that good cows, this, weight blocks for sure. You know, piling up.

Eric Hileman: [00:03:53] Speaking of Crohn's, we just released version 1.3 of our major mojo Cron extension for Magento two and that includes, fixes for the consumers that were released in 2.3.

So we wrapping those consumers and trying to control them inside of our Cron because they are, you're seeing those running wild on em too. I think that started with 2.3 is that right? Where the consumers came in.

Ivan Chepurnyi: [00:04:19] yeah, definitely. So. was that to our , my, one of my versions as well, zero running consumers, but you usually consume on us, you know, like Zay should be appropriately set up, by themselves, you know, like is, is, is akin around.

I'll excite garage jokes as soon as they're properly set up, with sort of proper configuration. And some. So, let's, start, from profiling the home page, right?

So I'm gonna right away, does a bug irrigation first drum. So. What is going to throw us? It was quite fast, I think

Eric Hileman: [00:05:04] before I moved to to New York, I had 30 acres outside of Pittsburgh and I had two Wells and a couple of times I had to pull those suckers up. From, I think, I think each of them are three or 400 feet.

So I like built a, like a medieval, police system above them and hooked him up to a little garden tractor and pulled him up and replaced them. And I'm telling you that is, they're heavy with all that wire and everything down inside that, well, they're not cheap either. That looks like a shallow, shallow jet pump.

Ivan Chepurnyi: [00:05:39] Yeah. I also have, well when I was living in a Ukraine, we have, an outside, there was a CT. we have the summer house. however, we had not only spending summer, so was there also interest as well. but it's kind of place where we go outside on a weekend down to. You know, is there a snow, what their pipes like in a city?

So you have to do Rio, there's a water yourself. And we have also, was there a couple of bumps? Is that our bobbin, OBS of water, and we also set up a, or was there even a, sewage as that, gets

Eric Hileman: [00:06:15] weeded out

Ivan Chepurnyi: [00:06:16] by an external service? So once a year.

Yeah. It's got off a sophisticated system.

Yeah. And here you can see is that we have actually some interesting things. so what, interests me? Why on home? She's a very sexually, they should be request. So. Is it the elastic search or something else? Let's find out.

Eric Hileman: [00:06:46] I don't know. Like I said, I'm kind of new to this one. We just got it like a hour before we were set to record, so we jumped it in.

Ivan Chepurnyi: [00:06:54] So yeah. So let's take a look. What kind of age? Oh my goodness. Well, Hey, to call to

Eric Hileman: [00:07:01] mail

Ivan Chepurnyi: [00:07:02] Chimp API. Yeah. They

Eric Hileman: [00:07:05] don't want to be doing that.

Ivan Chepurnyi: [00:07:08] Yeah. It's crazy. Let me guess. So if it happens on the homepage, probably it happens on every single beach. So

Eric Hileman: [00:07:18] yeah, we really, well, why would,

Ivan Chepurnyi: [00:07:20] why, why would you call a MailChimp on every patient Magento?

It doesn't make sense. Why would you call it an APA? Just abusing a bin second or four with adds a level of. Dependency of your Magento store. A porn. I sort of bought his service. It might go down.

Eric Hileman: [00:07:41] Yeah, that one. If that goes down or, or if it runs slow, that's what drives us crazy as well. We'll get through rapport like, Oh, you know, our store, it just randomly run slow.

It's gotta be the server. It's gotta be the service. Something wrong with your servers. Like sometimes it's fast, sometimes it's just slow. And then we find something like that and we're like, no, that's the external API. Call it from the page. It's slow. Yeah, definitely don't do that.

Ivan Chepurnyi: [00:08:05] And they kind of, 70 millisecond that they can tell you for sure is that it should wire rarely depending on the diamonds or their

Eric Hileman: [00:08:14] day or

Ivan Chepurnyi: [00:08:15] their, or you know, latency between Sarah virus.

So this is completely unnecessary to do this a on the front end, if they need to get something from his API is a better do it somewhere in the background. Yeah, but not a on every single issue. Typical, you know. Do, your Magento front-end. So let's take a look where is this called happens. Okay. So here is as a goal and ah, let's expand a little bit.

So what it is, what it's doing. It's taking MailChimp. GS. Okay. Hmm. This is even more interesting. So I see a rider was a bat. Does ever see an issue? Is this MailChimp module, who is the developer of this one? So MailChimp,

Eric Hileman: [00:09:09] that's pretty popular too.

Ivan Chepurnyi: [00:09:14] Yeah. so here you can see that those they use get module version. first of all, module versions has been deprecated in 2.3. So you don't have any more to specify as a DOP version in your module that XML. And is there a snow reason. Adult, do you use this module version on the front end? Because, Magento uses this model version only during this adopter great process of, as a database modifications.

So if you have some kind of update script to change your, that we structure or upload the data into the database. Zen, you needs this module being retrieved from the configuration. So Magento doesn't have any caching on top of this module version in order to be able to run. so DAPA great without, yeah, we was out rebuilding configuration from scratch.

and yeah, w was, was that actually, having stale data from the cash. So in this case. Marginal version. I don't know for what reason they are using it here. I expect the just to notify sort of party systems that, Hey, this merchant has this much version of module installed. It doesn't make sense in my opinion.

Eric Hileman: [00:10:24] So that's get JSU RL. Are they, are they literally doing JS call from the server side? That can't be right. See if you go up a little bit, MailChimp, JS get JS URL, are they really doing a service side call to get an external JavaScript file? That can't be right.

Ivan Chepurnyi: [00:10:44] I think Zara using the API in order to create some kind of a code or something like that.

So it would be, is that one, but let's actually, Check if was this MailChimp module is actually an opensource one. I think it is. Let's go. I think it is. So I had to go through the get hub and lads go into, what it is. It's a ma, it's eBiz, Bismarck, DBS.

Eric Hileman: [00:11:18] Let's see. Yeah,

Ivan Chepurnyi: [00:11:21] let's look for exam.

Eric Hileman: [00:11:24] I think, I think it's there. It is there. Oh, wait. The day changes. It was major monkey. I think. I think they changed it to, yeah, used to be major monkey. I see that one. And then someone else, peacemaker e-business MailChimp. If you click that, maybe you can, it looks like they forked it.

And they cloned it. And then you could probably go to the upstream.

Ivan Chepurnyi: [00:11:48] So you mean this one?

Eric Hileman: [00:11:49] Yeah. Let me see.

Ivan Chepurnyi: [00:11:52] No.

Eric Hileman: [00:11:54] Oh, they just clone it. They didn't work. It

Ivan Chepurnyi: [00:11:58] is this one. It looks like Magento one module.  It's niceMagentoa too.

Eric Hileman: [00:12:01] Yeah.

Ivan Chepurnyi: [00:12:03] No. So could we possible, it's not, good hop. Yeah.

Eric Hileman: [00:12:10] I let me see.

Ivan Chepurnyi: [00:12:15] I Bismarck, mail Chimp or Magento too.

Let's see. Oh, here it is. There you go. It's actually one of, if you show a MailChimp account. Okay.

Eric Hileman: [00:12:26] Yeah. MailChimp sponsored it for a long time, and then. If you, if you maximize your browser, but you mess up the OBS recording, it'd be easier to, for me to see.

Ivan Chepurnyi: [00:12:38] Yes. Okay. well, let me change as I'm sharing. it's okay.

So that'd be good. I can just, focus it on, my browser window. Oh, okay. For you.

Eric Hileman: [00:12:50] Yeah, yeah. A lot. Thanks.

Ivan Chepurnyi: [00:12:54] Okay. So now you can, actually see it, the morning details. So let's take a look at a helper. And this is called beta, right? And here we probably should be able to find this. it's like gap

Eric Hileman: [00:13:08] JS.

Ivan Chepurnyi: [00:13:09] Yes,

Eric Hileman: [00:13:11] there it is.

Ivan Chepurnyi: [00:13:12] Your owl. Okay. Oh my goodness. No way.

apart from that, is there a saving configuration on the front end?

So I can imagine that sound as this customer receives a lot of, flush the configuration cash or the frontend because they're really saving configuration value in does a database on the front end. And as we, so this request actually happens on every single.

Eric Hileman: [00:14:06] They're like, this is the de facto extension if you're running MailChimp, as far as I know, like this is the one everybody uses, and there's a lot of people who use MailChimp, so, well, definitely, yes.

Ivan Chepurnyi: [00:14:20] Let's dive deep into the cold logic over here. So if you take a look here, right? it tries to find the Euro and if it's active as there is no URL in configuration.

It tries to find the MailChimp story. If it finds the smell Chimp store ID. Oh, actually it doesn't. They check if MailChimp story specify specified. So that's why, bro, it was, we see a request is the problem is that customer didn't specify as a MailChimp store ID in configuration. So this extension tries to acquire the store ID.

Hello orders, they don't have even store ID you specified. Okay.

Eric Hileman: [00:15:06] Okay. Okay. So if you have the store ID configuration saved, it should not call this and should not make that external call.

Ivan Chepurnyi: [00:15:17] Yeah. It's, it's definitely a problem. So this is the one thing, and as are things that. Yeah. As soon as this one is received, it's gonna update this door configuration on the front end, and let's say if you have a multi-store website, when you have.

20 stores. It means that for every of the 20th stores, you know, on the front end, in the current school of that store, it's gonna store configuration. While we know that the base and adults, it means that, it also will lock your, cash entries and it will regenerates them. And it's not the good approach to do it.

So right away, it is. Gone, it should be a completely different thing. You know, like it, it shouldn't be happening on the front end. They should do it in a, Cron and they need to store first the foals, this URL. So if they have care story cause they have different GSE URLs, it's better to create own database table for it.

And Zen populates, is that the way stable by Cron job. And update URLs if needed by konjac, not by using, this kind of a hacky solution on the front end because it will, well, we just see it right away on this merchant. You know, as soon as merchant, Justin installed an extension, but they didn't configure it yet.

You, you are doing, because every single time you're going to call MailChimp API.

Eric Hileman: [00:16:54] Yeah. 

Ivan Chepurnyi: [00:16:55] at least if at least it's a receiver net, or at least it's a log error. Not that the other breaks a website, but no.

Eric Hileman: [00:17:09] Okay. Well that's good. We'll tweet that one out. Make sure you specify your store ID and your eBiz martyrs mail chain configuration, or your. Ah, your page speeds, depending on the weather.

Ivan Chepurnyi: [00:17:23] So in, in, in general is this is the word bed implementation?

Eric Hileman: [00:17:27] Yeah, there is a, there is a Cron, I'm pretty sure they have a MailChimp Chron, so they could have put it in there.

Ivan Chepurnyi: [00:17:36] Yeah. I don't know why they did it like that. It just doesn't make sense. And here get API. So this is, and as our performance issue, so let's take a look at the get API message definition. So here, okay. So Zen. It takes API key, Oh my goodness, do Y Z. You have fuzzes get module version, a call here

Eric Hileman: [00:18:05] to set the user agent.

Just to set a user agent first. Yeah.

Ivan Chepurnyi: [00:18:19] So, so Z is, it is this user agent. I would just completely, yeah. I remove this module version from here. Right. It doesn't make sense. Sure. A fair first, first of all, it doesn't make sense from point of your version or was a module because, setup, A version is a version for database upgrades, not for the code.

It was a gold rush. It's usually keeping a composer and usually you also keep it somewhere in a constant in your classes, not read it from configuration file. So is this one must not bizarre. Okay. so let's take a look. How much time. Dispense on this, mail chip thing. So one, seven, seven, two, you do 17.

So it's probably around 200 milliseconds per page advisees. Yeah.

Eric Hileman: [00:19:16] And the, and the actual 300 dash

Ivan Chepurnyi: [00:19:19] 300 milliseconds added buys this, functionality from three seconds. So it's kind of one 10. So the page load time on the homepage.

Eric Hileman: [00:19:29] You know, if it's, hold on, if it's setting that, if it's saving that front end configuration.

Is it really saving it? Because what not just save it once. Was that, Oh, is that the intended behavior? They thought, well, we'll just get it once and we'll save it and then we won't need to get it again. But yeah,

Ivan Chepurnyi: [00:19:46] so this is a basic problem, is that the customer didn't configure a Storkey and they didn't think about the cases that someone will have Zara extension installed, but not yet configured.

and PRIC Nazare she'd be cool.

And strains of the black Friday. Actually, we didn't catch this one. Oh yeah.

Eric Hileman: [00:20:17] Whoa. Carl exec.

Ivan Chepurnyi: [00:20:22] Yeah. Or CVN. Nextopia.

So this customer definitely has a lot of, we are the extension since bold. So

Eric Hileman: [00:20:41] where's the next Topia thing coming out of? okay. They have the next Topia

Ivan Chepurnyi: [00:20:46] search is client one line code available and then say, doing, do squirrel exec.

Eric Hileman: [00:20:56] Oh my God. And more performance. Depends on the

Ivan Chepurnyi: [00:21:02] next though. I search Magento too.

Let's see.

Eric Hileman: [00:21:15] Yeah, I don't,

Ivan Chepurnyi: [00:21:16] it's free extension or not.

Eric Hileman: [00:21:17] No, I think next Topia is like an external search provider, so it's probably not,

Ivan Chepurnyi: [00:21:22] yeah, it's exertional external search provider, but they see it's free. So maybe they have somewhere to get help repository, you know,

Eric Hileman: [00:21:29] maybe.

Ivan Chepurnyi: [00:21:32] Mmm,

Eric Hileman: [00:21:35] you could do. Yeah. And then it's like, yeah, there you go.

Ivan Chepurnyi: [00:21:45] Algolia is well known was the top results here.

yeah. As it is, there is no good help URL for this one available on a first glance. So by, but I would like to take a look into this code and probably I will. Say again, if you need to get some URLs, do it in the background, never do it on the front end. This extension abuses this logic. So, and this one is actually even, I could understand at least he was able to cash it.

But here I don't see any cash goals at all. So most probably is a just. For every single user for every single request just sends this HBO request, so just doesn't make any sense. Okay. So, and this is,

yes. Is this a CDN? Is fosters and a MailChimp one? Yeah, it should be. Well, it's not a good thing. .

Eric Hileman: [00:22:58] Although it does, although it's not really a CDN, it's just Nextopia there is search. So just

Ivan Chepurnyi: [00:23:04] put CDN and there's this weird  this is weird

Eric Hileman: [00:23:09] and we're back. 

Ivan Chepurnyi: [00:23:11] the next step, you're loading all customer groups.

Mmm. do you know by any chance how many customer groups this customer has?

Eric Hileman: [00:23:20] I don't.

Ivan Chepurnyi: [00:23:24] Yeah. So, I suspect that they have quite a lot because it takes a lot of time to construct as a array was a customer groups buttons. And is it trying to find the customer group goat? Sure. By using customer group repository. Is that is a bad, bad way to do it? So, you and he had to write a query just to look it up by ID, single one, not, not a law at all as a customer groups, as, as the option array and to, yeah, it just regards to the pository is that, just takes a lot of time.

Okay. And here. Probably as the rest of the page. He's just a normal render process of the homepage.  yeah. Form Munich art a mini card.

Oh yeah. It's done that Magento you shoe. something's actually gonna be fixed by, is it module I'm working on for customer section load. Linda's gonna provide you a, just a regular place holders for meaning cart. Okay. Here are what we have, assist under a same as blocks blogged directive. Okay. So they have same as block was in a same as book, and it's called trusted brand.

And this trusted the brand does what, DAS Lord was a category and I think they could be having couple of floats over the category. So I will take a look in, in their, case into this trusted brand module because it adds 300 milliseconds. You know, it's a little bit too much, I think, cause they could just access the needed data for our mom.

It could take over. Is it thorough what I do use for a menu or something like that. So in general, yeah, this is how things would, biggest performance issues. I see, Oh, wait a second. One more. I was so fascinated by HTTP calls that I didn't take a look at this one. Yeah. Okay. someone tries to access Magento version for composer.

Oh, okay.

yeah. So, and now's are a nice Magento module. But to be with the service is a 2.1 and this is funny.  so are in a constructor of a class, say trigger the complete method data load from a composer file in order just to check is a 2.1 version of Magento. Yeah. However, this doesn't make sense. So. Zay should have specified where should constraints for their quarter ways to branch out.

One range was a call for to print one one for blueprint two and 2.3 if they have some kind of logic, depending on the version of Magento. And honestly, I don't see, I need a reason why. This is gold here gets triggered on every single page, so this is another 200 milliseconds that could be completely avoided.

Eric Hileman: [00:27:09] What, like I, I, you've talked before about how you, you override, like are you manually hard code the version and you return it? Like why, why isn't there something inside of Magento build in that you could just simply query task and not have to like load the complete composer metadata just to get that?

Ivan Chepurnyi: [00:27:34] Yeah. I think it just.

Implementation of was framework because as a code, as after John's use, the F version of the product is within the framework. Yeah. and framework tries to read the computer files, so they try to abstracted the way, however, I also work, on a module, that would, completely, yes. Is it the will actually generate a patch, based on your current installed Magento version?

So it will just create a batch file for, is that a specific. A version of Magento.

Eric Hileman: [00:28:14] Yeah.

Ivan Chepurnyi: [00:28:16] And when you do a composer install it, we'll update this patch file to the new Magento version as soon as you upgrading your

Eric Hileman: [00:28:24] cause, that's what they're asking for in the marketing version. Like they're asking for the marketing version.

They're not asking for specific individual module versions. Right. Cause that's cause Magento releases our marketing. It's bull****. It's just marketing version. It's not a, it's not the actual like individual component versions. And that's what they're asking

Ivan Chepurnyi: [00:28:46] for. And this is a problem. You know, like you can have different variations of module combinations in your Magento system and stall.

You don't, you don't, yeah. Magento marketing version doesn't tell you actually what kind of functionality you have in current Magento version. And in 2015, when Magento Beta Magento 2 beta has been released and there was a lot of, Magento beta meetups, and Magento was pushing hard on telling, do not depend on marketing version of Magento, the powder version defined in composer file of the component and Zed.

So why in a components you have a version starting from hundred. And marketing immersion. Just a complete product release is that could be configured. Some dependencies can be specified as ignored by using composer replace and so on. So you, you can never expect that samplings at you as an extension provider.

We'll have the same piece of functionality available in specific marketing worship. You kind of do that  just

Eric Hileman: [00:29:59] right, and it looks like that's what they're doing and they're just checking the marketing version and they're not even like really checking a specific component. I don't think.

Ivan Chepurnyi: [00:30:09] Okay. 

Eric Hileman: [00:30:12] that's a short bike.

That's our friend that's shot by SEO

Ivan Chepurnyi: [00:30:19] around odd remote pager set.

the remote beach a set. Well,

Eric Hileman: [00:30:27] what is remote pages set.

Ivan Chepurnyi: [00:30:32] call . Okay, so I musty ads

around mural speed functionality. Yeah.

Eric Hileman: [00:30:56] Is this an extension war?

Ivan Chepurnyi: [00:31:00] Add the remote page asset

yeah. This just doesn't make any sense.

Eric Hileman: [00:31:10] Homepage that was, was that shot by SCO or just shot by, and what's the mirror morass? It is, it mirrors fit or morass fit. I don't know.

Ivan Chepurnyi: [00:31:21] In Ukrainian, a suite is a light, light, or world. And the meter, I, I don't know, it's probably some something, but, it's not  it's Mira suite today.

So it sounds more like Ukrainian. Yeah. So here we have a filter list. I just don't understand why. .

Eric Hileman: [00:31:48] Okay,

Ivan Chepurnyi: [00:31:48] so there was no word navigation here.

Eric Hileman: [00:31:51] Go down, wasn't there a there? There's, there's a shot by his SCO there. You see amnesty shot?

Ivan Chepurnyi: [00:32:02] Yeah. So Zay have some kind of a logic around the canonical URL. So you have a cononical, a URL for a page. And in this case, this, Mosty Maggio, thinks it's an integrity. Patient tries to, add all the filters to the economical URL. is that there are, see your friendly probably for that purpose, but it's completely unneeded on the homepage.

It's one thing. And second thing, it's also completely, terrible implementation for category pages as well because it takes a whopping 500 milliseconds just to, as a Sarah Euro. because first of all. Zay law, the complete list of all the fields are both attributes, all of the field triple attributes and ZZ even swords them on the PHP sides of this is where very slow process you see here, right?

He, he just, yeah, like seminar two milliseconds. Yeah. It's not real 700 milliseconds, but it does. A lot of relative complexity of the code they go. So we can see is that the, if they excuse  so it was a beach. A lot of time it's, it's like one, four. So it was a beige wall time spent on this, C C O URL. Okay.

So, Mosty doesn't stop to impress us.

All right, let's go to another page. I think we, they saved it a home page very well, and I can tell for sure, is it the homepage. Can be reduced to 400 milliseconds. A render time. Yeah. You know, all of this bottlenecks are removed

Eric Hileman: [00:33:50] and the, the two of the three important things were stop making external calls because that's blocking.

And if those external calls are down your block, they also vary in performance depending on their other servers in the weather. And then the other one is that when it saves the front end cash. There is front end a config, it flushes the front end can cash every time. So. That sucks.

Ivan Chepurnyi: [00:34:14] Also, an, we have here somewhere a load in the loop, but I don't see it in the timeline, but if it's somewhere, or was there a, you can see that a Catala category flat store one a 40 times it gets loaded by ID.

So instead of floating, for one query, by specified roles that could take a radius, it does at, for all categories. It's swamping and another fin is, this category is already probably loaded the menu block. So there is no need to, to actually run a separate query to load those categories again.

So definitely as a homepage, number of creditors can be reduced to 60. Where on the homepage. And right now it's hundreds and it's free.

So, yeah, I don't see, you know, complex logic over here on the homepage in order to have  number of that, the way square is to be requests and so on. So it's. Go into the, Boston pump category. this one seems like a quantum category, right? Yeah. With some sub categories, at least adhere broadly, right?

Is it a subcuticular? Let's open it up. Justice

Eric Hileman: [00:35:34] the John, I don't think so.

Ivan Chepurnyi: [00:35:37] Slow.

Eric Hileman: [00:35:41] Yeah.

Ivan Chepurnyi: [00:35:45] So let's profile as a spy agency. How's it going? I ride away disable aggregation because I know it's going to be a, for all this low.

Oh, Blackfire bleus make it the, your, default, make it possible to set as a default option to disable aggregation right away in your Blackfire profile account would be nice. Yeah. Because sometimes it doesn't make sense to profile Morrison. once  for slow websites.

Eric Hileman: [00:36:24] Do you like my bright orange Magento mug?

Ivan Chepurnyi: [00:36:27] Wow, that's cool. I have, somewhere in Ukraine at home. I still have one OSA or regional Magento. Magento color.

Eric Hileman: [00:36:38] Oh, like T mobile pink and caps. Yeah. That's collectors. The dish. That's collector's item man.

Ivan Chepurnyi: [00:36:45] Yeah. But the, it's partly a lost, it's

Eric Hileman: [00:36:50] been putting it in a dishwasher.

Lost its color and logo.

Ivan Chepurnyi: [00:36:56] Yeah. Okay. So could they go to page? It has now it has three H requests. So let's see. Broadly, it's using the stick, right? I don't know. I lost six search

Eric Hileman: [00:37:08] and MailChimp again. ****.

Ivan Chepurnyi: [00:37:14] Yeah. Mel, Mel, CIM jazz gets, so it gets a lot of fish to be cold from this store. So let's see, from, as a queries, I see, is that

every single Wetherby will get slower. 72 times was, that's not an inefficient bar. Okay. I was a Magento functionality. Also separate with this one is loaded. So somewhere as there is get attributed by ID or sound, Felix, at three years, a unnecessary load, for each attribute separately. and Nazar one is

a game and gets loaded. . Actually category data in this case, and it gets loaded 44 times. I think it's somewhere in the musty. I'm on Joel's, so let's take a look at the timeline. Oh, the timeline is another bottom. It's a little bit old way over here, so let's go and see what's going on here. So, okay. Here we have it.

And this is actually not the musty, so sorry, I must do for bashing you. You are not, this time. yeah, not this time. So this is some kind of custom, Landon trusted brand. It's something a developer. D bro, the front end developer, who didn't, does come back around to check, Hey, how can I get all the needed category data I need on this page?

So every single, lock here are related to Zika. Tegrity so broadly, is this, this data. Everything gets loaded separately. So every single subcategory gets loaded separately. This can be optimized by just, loading Elise of categories. Correct. Collection with the needed attributes instead of using a separate, could they go to load by ID?

Because as this one takes a lot of time, like free point. Oh, five seconds. And it actually takes majority. It was a page load time. You can see it here, right? Morrison, Morrison, 60% of the load time are spent on this trusted brands for

and here what we have as well. So I mean their, I look softer.

Mmm

building aggregations. Elastic five. So Jose, Dan? A upgrade to Elasticsearch six. Okay. Or it's old that a Magento version probably.

Right away. I just suggest, is this customer to install a smile? Elastic. Cute. It's much better from point of view of a to performance here. It doesn't look very nice and show by. By the way, if you use a smile, elastic suit, you don't need show by extension from a musty, because smile, a elastic suit already contains majority.

It was a functionality you need.

Eric Hileman: [00:40:56] It's 2.3 2.3 0.0

Ivan Chepurnyi: [00:41:01] yeah. So first of all, somehow it's still using version five, adopters for elastic search.

Oh is this one is Duff?

Yeah. So basically.

This is the main Nisha, shocked by, is, is this rent block, is it Lord separate or separately category one by one. Is this a common case of Lord in a loop? He has a standard one. So let's take a look at the page was products right. Because this one I sew also quite slow. Okay. So let's, profile is this page disable, aggregation.

So era's how many four products, right? And just category in total.

Eric Hileman: [00:42:13] Yeah. .

Ivan Chepurnyi: [00:42:16] this is quite a long time to load this page for just four products. So interesting to see what's happening there.

Okay, so 10 seconds and eight requests. Okay, let's go right away to  request to see what's happening there.  yeah, so five times requests to LASIK search

I would scroll live. Why? I'm lost to show by extension. again,  loading of the attributes inefficient. Zan. lauding. Oh, is this a set Messiah? Actually, so he's, this customer has some issues within MSI, being enabled. cause it all kinda mentioned your stuck item. Yeah. So here we see also a lot of famous Aquarius page slow.

And if you consider that, does they have one with four products? Is they're lucky because you've, there will be more products than four. Is that a would be even more conductive way. Square is

Eric Hileman: [00:43:43] here. So they said upgrade or there's patches out there. Did, did Magento release an official MSI reformance patch for two three Oh, or is it just the community patches that are out there?

Ivan Chepurnyi: [00:43:56] Oh, Messiah is just a, you know. Yeah. So what's happening was, , I've been working with one who was a merchant, so I'm fixing them aside for them. And a, is it problem is MSI. That's. that's where, strange thing. So Jose exit query as soon as they do some check. So Zay don't have any kind of pre-loading Zay just a, as soon as you ask for stock status for a product, it will try to find out what is this stock ID, what is the product that, It's still good information in set stock and so on, so it will just fire a lot of that. The way square Aries and the what is done in the core patches supplied was they, do they just add some in memory, a cash check for. Okay. If we do the check already for the product. We are not going to do this check again, but this one still actually doesn't, prevent the Lord the new loop because it still will do for every product.

They still will do the database query. Yeah. It won't do it as often as it's doing for, You know, every single product. So for instance, here you can see is they have one with four products right on the page. Yep. Whether you can see that they are doing, so to do database queries for every single, check for sq.

product ID

Eric Hileman: [00:45:23] is, is this fixed in two, three, one, two, three, two or any other higher versions? Two. Four.

Ivan Chepurnyi: [00:45:29] Yeah. So, this is probably. Two points. Three points. Three it's

Eric Hileman: [00:45:35] 2.3 is this version.

Ivan Chepurnyi: [00:45:40] Okay, so bore will be two points, three points, three gonna have a little bit less data waste queries. But as I mentioned before, the general problem in MSI is as a design of the module itself.

So as a designer was, the module itself was supposed to be completely different. You would suppose to grab a collection of products. And request a stock information for this collection of products instead of doing it per product itself.

So zipper Rolan was MSI, and for awhile it was a costumers. I was building a optimizations for category pages, shopping cards, product pages, all of those things. And, I've built bread or law, therefore MSI data. So instead of, you know, doing it a product, I just observe right. Collection up there, all of the violence and what populates the date does it?

This new unit for us, our set of assists in MSI, before the Saturday  request is data, and then I add bind. Your login surrounds those set of associate in order to, returns his data back and things Zandt. For instance, I'm on another mission, whom I am a Stolz this module as well. Like before that they had, something like hundred that the way square is on the category page and we reduce it to 55.

Eric Hileman: [00:47:08] Oh, here we go. Okay, so let me send this in the Slack channel. I'll take a look at this. This. So the MSI get hub Wiki does have a page with performance issues, and they have two, three, four, four patches listed.

Ivan Chepurnyi: [00:47:31] Yeah. So, Shope de walls, large number of duplicate database queries. A lot of response time. Yeah. So this one, we had, I had actually a merchant with the most recent Magento version installed. And, whereas all of those spices are applied, but there still was a 200 sampling database graders and particular page

Okay. And, Morrison, 200, gray areas, say if you have 10 products in the shopping cart, they're still going to be 200, that the way square is from which a hundred. And something I related to MCI that way square is so what I did, they just, Where would you use those? Square is only two, five queries for the wall and the same?

Or do you always sit off, you know, having a toddler and, yeah, as I said before, I had to actually do some kind of, Nods, the most elegant way to do it, because Zack elegant way would be actually through, right. The complete API and make sure that they are always passing. Zilly sells a product, to do those checks instead of doing it for every product separately.

But I had to observe some events in order to prepopulate something and then use it at the later stages at the introduce the STEM borough coupling. But there's the only way how I was able to fix that performance issues without, you know, breaking into functionality and throughs and breaking changes in

Eric Hileman: [00:49:01] Okay. So for everybody else to apply these patches at least, or upgrade or disable MSI, you can disable MSI right.

Ivan Chepurnyi: [00:49:10] If you don't use it,

Eric Hileman: [00:49:12] if you don't use that. Okay.

Ivan Chepurnyi: [00:49:14] Yeah. So is this, this, is that thing, right? So only four products, 400 is certainly one that the way squaring this is too much. So let's go with as a product page, shall we?

Eric Hileman: [00:49:29] Yeah.

Ivan Chepurnyi: [00:49:32] And it was quite fast. So it's a profile. It.

so.

200 with 59, probably. Again, someone would say that the B square is, let's take a look. it's, Aquarius. Yeah. Okay. Again, MSI, and also, some of the issues is that the exist in , I assured their two points. Three points. Zero.

Eric Hileman: [00:50:38] Yeah.

Ivan Chepurnyi: [00:50:42] Because as this one, it looks like a, they're running. two points, three points, three

I would guess as this Glarus R M I had, it was a recent, the merchant. And, after we upgraded from 2.3 0.2 to 2.3 0.3 as this square, we started to show up, on every single page in Magento. And, this square is, we're kind of a performance regression and 2.3 0.3.

Yeah. This actually is the same ones that we've seen in script goal. as, as well, this is related to this beige cash, getting them to dismiss it.  and yeah. It's introducing unnecessary that the blue square is, yeah. Okay. Let's see what else here. So. Is a product rendering is actually all here, but all the rest of the things are around it.

Okay.

And the as is, there was a lot of things happening, getting composite repositories. This is that. We already, so in a column page, so it's the same. And here on the product for you, what do we have here? Right? Oh, yeah. It's the layout.

Eric Hileman: [00:52:19] yeah. Double checked. It's game 2.3 

Ivan Chepurnyi: [00:52:25] mm. Interesting. All broadly is in the  Gresham is on  that they, I don't remember exactly. What has been changed about after we upgraded those squares started to show up in and you're like, so okay, here we have another one. Yeah. So again, a shop, by extension, we are on a product page and it still tries to work out all the filters.

So he just doesn't care I own page or not. They just gonna load all the filters no matter what. Yeah. So is there is, there was definitely some quick wins by removing as this,  interceptor from now for all non category pages, like from product page and from a homepage. So you can save a lot of time by a disabling.

It does that in a way. How, if I'm know. MailChimp, of course. And this time, their API was very fast to respond, but there's still, Zara doing some nasty things was a modularation check for a user agent to calls a pay, case. What do we have an abroad act here? Hmm. Yeah, you would take some time.  but

a lot of it will be out not much visible when you actually, just  a viewer beige was our profiler and because there is not a big color hat as they see here. Okay. So seal markup. Let's take a look at this one. No. Or for data. Get data. Okay. So here is a, and that was a performance issue. I mean, a sweet to see on markup module.

Ethan is a product, again, on the product page. So it was a product that is already, or was there and speak to say, it's, Hey, I'm gonna load this product again.

And is this a product load? The gun is, is completely rather than done on product page, right? Because we already have a product.

So this is one thing. Sure. And does the rest of the things are just a slow, slow down or MSI functionality. But Zurich can be saved a lot of time by reducing that waste. Square is a problem, is say dry. Let let him, let them try to apply patches. Let them try to, It disables this monster show by module and if they have an issue with it, they can always contact me.

Eric Hileman: [00:55:36] How, how much of a, how much work is involved? Like if you disabled shot by and you enable elastic suite and you replace the shot, buys a filterable layered navigation and everything, like how much work is involved with that? I mean, that's something like the average developer can do.

Ivan Chepurnyi: [00:55:58] Definitely those average rural board can do it. But, yes, there's a basic problem is if a Zay modified the, as a team place, of shop by. and, he, for instance, yeah, shall by actually using on Tim, please write to render filters and Magento using different depletes. So Jose actually need to style filters, output from.

Standard Magento in order to match, you know, Zara design.

Eric Hileman: [00:56:29] So it's just, it's, it's more of a theming issue then, and not like

Ivan Chepurnyi: [00:56:32] a, yeah, it's, it's, it's more, Oh, for his immune issue, not a firm point of view of

Eric Hileman: [00:56:39] optionality and coding and back end of, okay. Okay. That's that. That doesn't sound bad. All right.

Ivan Chepurnyi: [00:56:49] Okay. Let's take a look at a. It's funny. Yeah. So from the backend perspective, just a configuring, it was to execute properly. That's all.

Eric Hileman: [00:56:59] And we do that.

Ivan Chepurnyi: [00:57:02] Oh, why do I profile product? Which again, I actually wanted to profile add to cart.

well, it's, yes, let's close this one and we're just. Clique is this magic bottom profile. All requests. Okay. So all the requests are profile with, now let's add to cart  that was fast.

 and it was done without, actually, I didn't grow up to cart. So you see as a do it for the JavaScript.

Okay. Would they like to keep it in current year? I'd like to give it in the cart. Yeah. Okay. Now we're going into the shopping cart and shopping card seems slow. Okay.  so let's stop a profiler and let's take Glucotrol profiles. Okay. So first of all, let's take a look at. Imports at item index. What, what is important?

Interesting to see, what it actually does. Okay, so imports, it's some kind of custom modules they have is that adds us in here, honestly, broke as a cart and the, Oh, okay. This customer actually doesn't use MSI.

Eric.

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

Ivan Chepurnyi: [00:58:37] Yeah. Jasmine disable them assigned modules. Quick fix. 

Eric Hileman: [00:58:44] awesome.

Ivan Chepurnyi: [00:58:46] Yeah. Easy. Easy, easy, easy. Okay, so.  now, let's take a look at the other, profile as well, right?  I probably did a little bit, messed up the size. It was a window, but now it's back. Okay. So now I can go and see what else we have here.

We have all sorts of Chicago cart page as well. And so definitely there is the same issues. Was MSA. Yeah. Plenty of attributes it, products and stuck in a mentoree item. Yeah. So easy fix, disable MSI and, wait a second. Yeah. they also didn't talk to my composer.

Eric Hileman: [00:59:48] What do you mean by Degas? Closer?

Ivan Chepurnyi: [00:59:52] Yeah. So when you, run Magento. A Magento is using composer in order to find which glass located in which file and towards this glass into memory or for BHB and composer has this possibility to create a, a class map. Is that the what, after magically, Thou, composer, in which file, which class is located, was out resolving.

It's for as a file system by using file exists. And here, I ICS that is there a pretty present 297 call still file exists, in composer is, it puts a lot of pressure on AOL and adds a lot of sippy or a lot diamonds. Well, no, this is something

Eric Hileman: [01:00:39] you do.

Ivan Chepurnyi: [01:00:41] You do it during the deployment. so you, even Magento has a guideline how to do it.

So you have to go, actually, let's open up with the Magento, deployment, suggestions and we'll, we can get into the show notes. they are, docs, Magento, composer, after, Lord.

Yeah. Number one.  Oh, composer optimize. Yeah. Performance. Best practices. So here, If you were installed fru , a composer,  and then and deployment flow. Okay, here it is. So look, ah, it says dependency injection instructions. So your first run said dub da compile in order to compile all the files, all the classes that Magento is gonna use.

And then you have to run composer  who is minus Oh flag. Cause it will tell it's that, it should be an a rate optimized class maps. And it will create the file and the file systems. It will be done good by BHP, and every single and Magento store. I was there will benefit a lot by enabling a class map of communication because I was already a to PHP cannot, cash efficiently, Luke episodes of classes because composer still will, hit the file system.

And when you have this one, Optimized Zen BHB. We'll just do that directly. The exit data from memory, if op cash is enabled and glasses already in cash,

Eric Hileman: [01:02:35] is there a, is there a check? Okay. Yeah, it's confirmed with APC. I know. I see a lot of people not doing that. Actually. I think a lot of people don't know to do that.

Ivan Chepurnyi: [01:02:48] Yeah. A lot of people probably do it in threes, is a look on Magento store and a defining story. This is actually was introduced, after, in 2000 the. 16,  benchmarks to compare Magento, Magento Ireland versus Magento two. And, the problem is that in benchmarks, Nolan was optimizing composer, after Lords.

However, Magento two is heavily based on composer and you're always need to optimize composer of Delores and production. Yeah. And a off, there's that Magento actually added it. There was a devil dogs as their recommendation to enable composite optimization. 

Eric Hileman: [01:03:29] sweet. Well, that's some good, big wins for this customer, man.

easy wins.

Ivan Chepurnyi: [01:03:37] Yeah. Awesome. Yeah. It's easy wins. Yeah. So does a blend PSI. Enable the composer optimizations and

Eric Hileman: [01:03:51] and replace that with a smile elastic suite and then set your store ID for MailChimp extension.

Ivan Chepurnyi: [01:04:00] Yeah. And to find things at the smile lost six is actually free.

Eric Hileman: [01:04:05] Yeah. Yeah. And then the next Topia thing, I don't, we should probably ping them and be like, yo, next step. Yeah. Like you shouldn't be doing that external call.

****. That's not cool. That's the, yeah. What was that? Is that an external search then the next Topia .

Ivan Chepurnyi: [01:04:27] Yeah. So as far as I understand, this is something here. So let's say pump and so is this, this provides this a fast a search, you know, on a, is it a web shop? So powered by an stock down.

Eric Hileman: [01:04:45] Okay. Cool. Well, I guess we can wrap it up and try to keep it like under reasonable amount of time, this episode.

Ivan Chepurnyi: [01:04:53] Yeah. Finally, finally, we did something in a reasonable amount of time, right?

Eric Hileman: [01:04:57] Yeah. So hit us up. We are L I T L at MageMojo.Com and on Twitter. We'll link up our Twitter accounts. hit us up if you have any sites that you want reviewed, we could certainly do that. We'd love to do that. Yvonne, anything else before we, head out?

Ivan Chepurnyi: [01:05:13] Yeah. Optimize a, your composer during deployment.  on one issue across everyone.

Eric Hileman: [01:05:20] Yeah,

Ivan Chepurnyi: [01:05:21] yeah. So, yeah. Do you feel, is the next time a dear viewers, thank you for, watching us as this episode probably is going to be in two weeks, right? And being released?

Eric Hileman: [01:05:31] No, actually, I, Jordan should be able to crank it out.

Quick cause he just finished the other one. So we should be able to get it out. I would hope like Monday or Tuesday there's no issues with audio or anything crazy. Okay. So next time everybody

Ivan Chepurnyi: [01:05:46] will check right away after his episode. Yeah. Next time.

 

 

Leave a Reply
  • Cisco
  • Intel
  • Redis
  • Magento
  • Nginx
  • Dell
  • Percona
  • MemCached
  • PCI Compliant
  • BBB