This week our development team pulled out all the stops to make the ManageWP dashboard load time significantly faster. A big part of the ManageWP appeal is creating an efficient working environment, and loading up your websites 3x faster will certainly make you more efficient. No time wasting here.
Originally, when we were thinking up the ManageWP dashboard, we wanted our users to see only one loading screen, and that was it! This scaled well at first, but as we added new features such as the Automatic Security Checks, Automatic Performance Checks etc. the data needed to display your dashboard grew significantly. So, we rolled up our sleeves, started benchmarking and plotting charts.
After all of this Scientific Method ™ we came to a conclusion that the main bottlenecks were:
- State recalculation (uptime statistics, SEO statistics etc.)
- As the codebase grew, some of the data became obsolete
- Sub-optimal queries and algorithms were used in some places
Now, because we had the data, we could make a game plan:
- Optimize queries and calculations
- Only pull the data that is needed
- Stream bigger responses to the dashboard
- Make an event stream (more on this below)
This is what made the biggest difference. Every time a website went down, a new Security Check was ran or a new SEO keyword result came in, an event is fired off in our system. Then, the event is pushed to an event queue where dedicated workers consume them and do the heavy lifting (state recalculation).
Here are some stats regarding the optimization:
- The average load of benchmarked users, who had a load time over 5 seconds was 11.36 seconds. Now it is 4.15!
- The average load of benchmarked users, who had a load time over 3 seconds was 6.09 seconds. Now it is 3.42!
This is not the end of our effort to optimize the ManageWP dashboard. It’s an ongoing process. I would like to thank Nebojsa Urosevic, one of our hardworking software engineers, who did a great job implementing all of the optimizations discussed in this article.