Understanding Speed Index
Speed Index is an abstract score that was introduced in order to help overcome the limitations of the current set of metrics.
Join the DZone community and get the full member experience.Join For Free
there’s a lot of buzz around the speed index metric, but what exactly is this metric and how is it calculated? even more so, why do we need a new metric when there are so many already on the plate? this article gives you detailed answers to these questions.
what is speed index?
user expectations have changed drastically, web pages are expected to load faster with all elements rendering as soon as possible, and user frustration increases if the visual content of the page is slow to load.
there are several metrics used to measure user experience, but do these give us a clear enough picture? not really. for example, render start indicates when the page started painting, but this could mean it loaded a white background, a random object, or just a dot on the page; the user, however, may still be looking at a blank page. the document complete metric, which flags the onload event, may not be important from an end user’s perspective as it considers below-the-fold requests as well; there could be instances where the document complete is triggered even when the page is blank.
speed index is an abstract score that was introduced to overcome the limitations of the current set of metrics. it measures user experience and unlike render start or document complete, it is not a timing metric; therefore, the smaller the score, the better it is. speed index takes into account the visual completeness of the page above-the-fold. it does a much better job of measuring the perceived performance of a page, but does this mean other metrics are irrelevant? this is debatable. instead, the choice of a metric depends on the scenario and the nature of the website being analyzed.
how relevant is speed index?
speed index will let you know if the visible content is loading quickly or not. the lower the score, the better is the user experience, and vice versa. the speed index score indicates whether you need to optimize your page or not. to maintain a good score, there are two critical aspects that you should look at: optimizing content efficiency and optimizing the critical rendering path .
web applications continue to grow in terms of functionality, scope, and usability; hundreds of resources make up these applications and fetching each resource adds to the page load time. maintaining performance is possible only when the resources and content that make up the page are optimized. speed index plays a critical role in monitoring the performance of visible content.
how is it calculated?
speed index lets you measure how quickly a page’s content is visible. however, it can be a little tricky to understand what it means and what factors contribute to the score.
speed index uses film strips to calculate the score, each frame is scored for visual completeness above the fold; the score is 0% for a blank screen and 100% for a visually complete screen. the score for each frame is calculated using this formula:
interval time*(1 – visual complete %/100)
the process is repeated for every frame and the cumulative of all the scores gives you the speed index of that page.
let’s take an example:
adding all of the scores gives the speed index score:
500 + 450 + 350 + 200 + 50 = 1550
here is another example:
let’s add up the score:
500 + 500 + 475 + 400 + 350 = 2225
from a performance point of view, the lower the score the better it is. there is no defined benchmark for speed index, however, a score of <1000 is considered good. user experience is better if above-the-fold content is displayed faster, and this is what speed index determines.
measuring speed index using catchpoint
to check speed index, you will need to enable the capture filmstrip option under the advanced settings of a test. it is displayed along with other metrics in the charts, and you can also view it in the waterfall graphs. here are a few examples that illustrate how pages that load the visual content faster have a better speed index score.
in the above example, the page has a good speed index score of 1260. if you look at the film strip, the interval is of 500ms, and from the second frame, the visual content is visible, which is about 1 second. frame three has almost all the content loaded. from a user’s point of view, we have engaged them from the very first second due to the fact that the page is optimized.
in the above image, the visual is visible in the third frame. the first two frames are blank, which is why the speed index score of 1741 is higher than the first example. the user views content at 1.6 seconds, unlike the first example, where the user viewed the content within a second.
based on the final example above, we are able to understand what is happening. the first two frames are blank and in the third frame visual content starts to load. however, the completeness is less compared to the other two images in the same frame. the visual content continues to load in the fourth frame, but it’s not complete until the fifth frame. this means that the user needs to wait for 1.6 seconds to see something on the page, and another 2.8 seconds to view the complete visual content.
in all of the examples, the render start is triggered before the user views anything on the page. in the second example, the render start happens at 1195ms and the visible content starts to load at 1604ms. in the third example, the render start happens at 1296ms and the visible content starts to load at 1597ms. this is the uniqueness of speed index. with a highly unoptimized website, the difference could be extremely high, with render start happening quickly but the visible content loads quite late. you need these insights to optimize your websites.
limitations of speed index
when running transaction tests for dynamic sites or single page applications that use ajax, the score is always good in the steps that follow once the page is opened. this is because the page does not refresh after it is loaded. pages featuring carousels that rotate automatically may be penalized because they continue to change even after the page load is completed.
speed index indicates the visual completeness of the page; however, it does not indicate if the content was critical or non-critical for the user. as such, it should not be a replacement for other metrics and should be considered a rather useful and much-needed addition to the list of metrics. you will still need to look at render start and document complete to understand the overall performance. speed index gives you a different perspective of the user experience that your site delivers.
Published at DZone with permission of Moiz Khan, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.