VivaTerra: Finding Why a Slow Site Was Slow, and Halving Page Load Time
VivaTerra: Finding Why a Slow Site Was Slow, and Halving Page Load Time
VivaTerra case study: the web host was not the cause. Razoyo traced slow pages to database calls and extensions and cut load time from about 1,200 ms to 600 ms.
VivaTerra’s pages were loading too slowly, and the company assumed its web host was to blame. Razoyo traced the problem into the code: page templates making many database calls where one would do, and extensions that slowed every page. VivaTerra was not ready to move to a new platform, so every fix had to work inside the one it had. Load time on most pages went from about 1,200 milliseconds to about 600.
At a Glance
| Client | VivaTerra, an online retailer of sustainably and ethically made products |
| The symptom | Slow page loads |
| The suspected cause | The web host |
| The actual cause | Repeated database calls in page templates, and slow extensions |
| The constraint | Not ready to migrate platforms, so every fix had to work on the existing one |
| How we found it | Code review of the templates, then New Relic for the harder cases |
| Load time, most pages | From about 1,200 ms to about 600 ms, a 50% improvement |
| Client-reported, 2016 | Bounce rate down 26%, conversion up more than 30% year over year, 10x typical traffic on Cyber Monday |
In short: The obvious suspect was wrong. Hosting was not the problem, so a hosting change would not have fixed it. We found the cause in the code, fixed it without a platform migration, and the one fix that cost the business something was a trade VivaTerra chose to make.
The Situation
VivaTerra creates and sells products made in a sustainable, ethical way. It began in 2004 on the coast of California, now runs its headquarters, customer care center and distribution facility in Virginia, and sources from artisan communities in more than 20 countries.
Its online store had a speed problem. The company believed the cause was its web host, and it turned to Razoyo for help.
What Was Breaking
It was not the host. The problem was in the code, and it was more complex than a hosting change could reach.
- Too many trips to the database. VivaTerra’s PHTML page templates called the database several times to deliver a page that could have been built from one call. The way we described it at the time: if you wanted 10 gallons of milk, you would get them all in one trip to the grocery store, and the site was making 10 separate trips.
- Extensions slowing the pages. Several extensions added load time. Two stood out: one that controlled how prices were set on configurable products, and one that placed labels on product images on category pages.
One constraint shaped everything that followed. The site ran on Magento 1. Magento 2 handled the pricing behavior VivaTerra needed on its own, but VivaTerra was not ready to migrate its site to the new platform. Every fix had to work on the system it already had.
What We Did
We worked from the code outward, then used tooling for what review could not find.
- Reviewed the site and its templates. Our developers ran site reviews, then went through the most commonly abused templates looking for loops inside them.
- Instrumented it. We used New Relic to track down the harder-to-find issues, the extensions among them.
- Removed an extension, with the client’s agreement. VivaTerra used the Simple Configurable Products extension so that prices for configurable products came from the simple products underneath them, rather than being set as percentages, which is how Magento 1 handled them. The extension significantly slowed the site. VivaTerra agreed to let us remove it, which meant going back to setting configurable prices as percentages. Page load times dropped drastically, and the trade worked out in the company’s favor.
- Rewrote the slow part of another. The Product Labels extension by Amasty lets an admin put small labels in the corner of product images on category pages, shown according to rules. We worked out which parts of it were really slow and rewrote that code so it finds all the labels at once instead of one at a time.
- Cached the result. With label rules in place, the code has to work out which products are on the page and then check every condition. Once it has done that, it should not have to do it again. We cached the extension so the work runs once and the cached result is shown from then on. When VivaTerra changes a rule, it clears the cache.
The fastest fix was a business trade, not code. Removing the pricing extension cost VivaTerra a convenience, and it was the company’s call to make. It made it, and the speed was worth it.
The Result
- Load time halved on most pages. From about 1,200 milliseconds to about 600, a 50% improvement. Category pages improved too, though they still load a little slower than other pages, which is normal because they carry much more content.
- Results the client reported in 2016. VivaTerra’s eCommerce Business Manager, Kristen Perkins, reported a 26% decrease in bounce rate and a more than 30% increase in conversion rates year over year, largely because of the optimizations, and said the site supported 10 times its typical traffic and site revenue on Cyber Monday.
“We’ve definitely recouped all of the investment of having the code properly optimized by members of [their] development team. It’s great to see the immediate ROI from their projects and to have the peace of mind of stable, well-written code that will support our store’s growth.”
Kristen Perkins, eCommerce Business Manager, VivaTerra
What This Case Study Does Not Claim
This work dates from 2016, on Magento 1. We include it for the diagnosis, not the platform. The bounce rate, conversion and Cyber Monday figures are VivaTerra’s own, reported by its eCommerce Business Manager, and we are not claiming the speed work alone produced them. The load time figures are the ones published with the original project.
Who This Is For
- Your system got slow and the obvious suspect has not been proven. Hosting is the usual guess. Here it was the code, and a hosting change would not have fixed it.
- You cannot replace the platform yet, so the fix has to work inside what you run today. That is the situation our Beyond Platform Limits page is about.
- You run code with templates and extensions nobody has looked at closely in a while, and you are weighing whether to fix it in place or start again. This project is the fix-in-place side of that decision. Rewrite vs refactor an inherited codebase walks through how to choose, and who takes over software someone else built compares the firms that do this work.
Is Your System Slower Than It Should Be?
Start with a free 30 minute consultation with a senior engineer, then a fixed price $2,500 Fit Spec if it is worth scoping. The Fit Spec maps where the platform stops fitting, what the custom layer must cover, and what it costs, and it is yours whether or not you hire us to build it. Every price is on our pricing page, and our process shows each step.
Frequently Asked Questions
Why was VivaTerra’s site slow?
Its page templates called the database several times to deliver a page that could have been built from one call, and several extensions added load time, including one that controlled configurable product pricing and one that placed labels on product images. The company first suspected its web host, but hosting was not the cause.
How did Razoyo find the cause?
Razoyo’s developers ran site reviews, searched the most commonly abused templates for loops, and used New Relic to track down harder-to-find issues such as slow extensions.
How much faster did the site get?
For most pages, load time went from about 1,200 milliseconds to about 600 milliseconds, a 50% improvement. Category pages improved too, though they still load a little slower because they carry much more content.
Did VivaTerra have to give anything up?
Yes. Removing the Simple Configurable Products extension meant VivaTerra went back to setting prices for configurable products as percentages. The company agreed to the trade because page load times dropped drastically.
What business results did VivaTerra report?
In 2016, VivaTerra’s eCommerce Business Manager reported a 26% decrease in bounce rate and a more than 30% increase in conversion rates year over year, largely because of the optimizations, and said the site supported 10 times its typical traffic and site revenue on Cyber Monday.
How much does it cost to find out what a fix like this would take?
A free 30 minute consultation, then a fixed price $2,500 Fit Spec if it is worth scoping. On custom work, once fees are paid you own the code we write for you.
Explore with AI:
These links open AI platforms with pre-written prompts about this page.