Posts

Improving page speed in the Create application

Working with a ‘legacy code base’ has it problems, over the last 15 years assets have come and gone, been added to, re-written etc etc. All this has led to a build up of files that are slowing down page load times but that everyone is scared to touch.

As part of a recent re-skin of the system, and thanks to the last 2 years of refactoring how we serve and build assets, I realised we had dramatically reduced the amount of cruft being loaded.

Here’s an example from just one page;

Before

CSS

IMG

JS

After

CSS

IMG

None.

JS

What we’ve done

Still to do

We’re loading jquery.min.js, jquery-ui.min.js and jquery.ui.nestedSortable.js for only one purpose - nestable drag and drop ordering. We’ve used the vanilla javascript drang and drop library Dragula in other areas of the application. The only thing stopping us using it here seems to be the lack of support for nesting items. But it’s something we should spend more time looking at as these 3 files are massive and really shouldn’t be here (We could even load them asynchronously for now).

The above is for just one page of the application and whilst some of the changes are global, lots of other pages need this special attention too.

Blog Home