Introduction
As i’ve continued adding studios to the all countries page, the page load time has been increasing significantly. I just took a first crack at improving the speed and I was able to reduce it through optimization and backend clean. I wouldn’t say its resolved but I bought myself more time. Using googles developer tools I ran 5 individual tests for each studio type before and after the optimization to generate the results below.
Before/After Page Load Time
# Studios | Pre-Optimization Load Time | Pre Mean | Post-Optimization Load Time | Post Mean | Seconds Changed | Load Time Reduction | |
VFX Studios | 406 | ~5.12 – 7.30 | 6.21 | ~2.52 – 4.69 | 3.60 | -2.61 | 42% |
Animation Studios | 177 | ~3.53 – 5.06 | 4.29 | ~1.85 – 3.28 | 2.56 | -1.73 | 40% |
Game Studios | 95 | ~3.07 – 4.42 | 3.74 | ~1.62 – 2.77 | 2.19 | -1.55 | 41% |
Below are my individual tests of which I used to generate the averages and percentages above.
Individual Page Tests
Time In Seconds | VFX Studios(406) | Animation Studios(177) | Game Studios(95) |
Pre-Opt Load Time #1 | 5.01 – 731 | 3.38 – 4.94 | 2.92 – 4.46 |
Pre-Opt Load Time #2 | 5.21 – 7.42 | 3.53 – 5.03 | 3.05 – 4.34 |
Pre-Opt Load Time #3 | 5.13 – 7.28 | 3.65 – 5.19 | 3.06 – 4.34 |
Pre-Opt Load Time #4 | 5.22 – 7.34 | 3.53 – 5.08 | 3.18 – 4.47 |
Pre-Opt Load Time #5 | 5.03 – 7.15 | 3.58 – 5.08 | 3.16 – 4.50 |
Post-Opt Load Time #1 | 2.78 – 4.73 | 1.98 – 3.33 | 1.59 – 2.77 |
Post-Opt Load Time #2 | 2.62 – 4.56 | 1.89 – 3.44 | 1.68 – 2.80 |
Post-Opt Load Time #3 | 2.60 – 4.74 | 1.79 – 3.18 | 1.57 – 2.69 |
Post-Opt Load Time #4 | 2.35 – 4.38 | 1.81 – 3.24 | 1.54 – 2.69 |
Post-Opt Load Time #5 | 2.35 – 4.43 | 1.78 – 3.24 | 1.73 – 2.91 |
Why does it take so long to load?
Most of the load time is in the calculation of the locations estimated size. Of which is dependent on the looping through each studio adding its size to a variable and incrementing for each. This is done at each page draw, ideally this would be calculated at the insert, remove or change of studio size on a per location basis. However that will require a larger rework that after this major reduction of speed I’ve put lower on the priority list. I will continue monitoring the speed but hopefully these improvements will be enough for the time being.