Hello, everyone. I'm Hina. I'm from Expedia Group. This talk is around the search speed that is making Expedia flights faster. We will focus on the performance initiatives that are carried out on the Flight Search page on Expedia and the investigations done on that so far.
So first of all, the motivation behind the same was that on Flight Search page, there is a peak search traffic that lands on FSR, that is Flight Search page. And then it goes to Flight Information and hence to the Checkout page. So with the latency overhead, the user experience was getting impacted and hence the bookings as well. It was also very important to retain the users by improving the performance.
So when it comes to performance, we also observed that monitoring is very crucial. And for the same, there were some custom metrics that were defined. One of that is page usable time, that is, the time that a component takes to render on the Flight Search page. The main component on Flight Search page is the list of offers that appears. So as soon as the page renders and the offers list gets rendered, the page usable time gets marked. The second metric is non-supply overhead, which is also a custom PERF metric. So that means that the total time that the Flight Search page is going to take minus the supply overhead time. There are some other Lighthouse common metrics as well, such as First Contentful Paint, First Input Delay, Cumulative Layout Shift, and Time to Interactive that were also monitored. Apart from that, ensuring that the bundle size is not increasing the threshold suggested and ensuring that the app is lightweight is also very crucial when it comes to performance.
Now, I'll discuss around prefetching. This is one of the PERF initiatives that was carried out in Flight Search page. So prefetching refers to fetching the JS bundles beforehand so that as soon as the user is going to land on Flight Search page, the time that is consumed on fetching the CDN paths can be saved by caching those JS bundles beforehand. So what we did here is that we fetched the bundles on the previous page, that is the homepage, and the fetching of resources happened during the browser ideal time. So that means that there was no constraint on the homepage when it comes to performance, and the resources are fetched using the prefetch cache. This is impactful for the new users, for the existing users if in case the users are navigating on the Flight Search page, the bundles are already cached using the browser cache. The prefetching experiment is something that is good to have on the web pages, and the PERF initiative, this PERF initiative helped us gain around 100ms. It was not a very significant improvement, but it was good to have and it made the CDN path retrieval very fast as compared to the older user experience.
Then the next experiment we have is preemptive search. So by preemptive search, we mean that we are able to predict the Flight Search response even before the user lands on the search page. That is, on the previous page, which is homepage itself, we were able to figure out the response using the inputs that were given by the users, such as as long as the user provides origin, destination, departure date, arrival date, we were able to figure out the response, and on the back end side, we cache the response for faster retrieval. As soon as the user lands on the Flight Search page, the data then comes from the cache instead of retrieving it runtime.
Comments