2x Faster page load time with the new bundling of JavaScript files

2x Faster page load time with the new bundling of JavaScript files

Fast page loads are notorious for providing a much nicer user experience. Who likes to wait or have a slow display of the page?

In the continuous offer to render Hue snappier and at the same time modernize and improve the developer experience, JavaScript files are now bundled together and are importer only when needed (under the cover this is done by leveraging https://webpack.js.org/).

This is a lot of requests not happening anymore when opening Hue the first time!

 

188 requests and 13s (before) vs 89 requests and 7s (after)

 

The change is already in master and will be fully part of Hue 4.5.

 

Note: these static files are then cached and served when using a balancer like NGINX and since the version 4.0 Hue is a single page app with no reloads.

 

Before: seeing a lot of requests when opening the editor page

 

 

As usual feel free to comment here or @gethue!

 

2 Comments

  1. Ruslan Dautkhanov 1 week ago

    Is this comparison uses bare HTTP protocol?
    We’re running Hue instances behind Nginx with HTTP/2 enabled and caches Hue static files anyway.
    HTTP/2 should have similar effects on performance as it makes fewer request-responses
    and might be comparable to what you did by bundling those static files.
    Thanks for sharing!

    • Author
      Hue Team 1 week ago

      Yes, basic HTTP. And all the assets (JS, css…) are then only loaded on demand, a bit like Java packages: https://webpack.js.org/

Leave a reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.