Closed Waishnav closed 5 months ago
Thanks for the feedback @Waishnav. However all modern browsers will cache the wasm file and merely verify that it has not changed in subsequent page loads (unless the browser has been configured to avoid caching). This means that there is no advantage of using a service worker. Unfortunately it appears that you have <1 Mbit/s which probably won't give great loading performance for a large web application. Given that caching is already implemented I will close this issue, but thanks again for reporting.
During the first load for the Graphite, in the waterfall we can see the wasm file being requested if we refresh the tab, currently we relied on browsers capability to cache the requested assets. This can be improved by intercepting the request using service worker and serving the cached response if cache available.
This can improved the performance if graphite is being daily drivers for our users.
In the above ss, it can be seen for wasm file it took 20 seconds also 2.3 MB of server bandwidth, we can save bandwidth throwing introduction of caching since it can be consider as static asset/file for each version in prod.