Return to search

Load time optimization of JavaScript web applications

Background. Websites are getting larger in size each year, the median size increased from 1479.6 kilobytes to 1699.0 kilobytes on the desktop and 1334.3 kilobytes to 1524.1 kilobytes on the mobile. There are several methods that can be used to decrease the size. In my experiment I use the methods tree shaking, code splitting, gzip, bundling, and minification. Objectives. I will investigate how using the methods separately affect the loading time and con- duct a survey targeted at participants that works as JavaScript developers in the field. Methods. I have used Vue for creating a website and ran Lighthouse tests against the website. All this within two Docker containers to make the reproducibility easier. Interviews with JavaScript developers were made to find out if they use these methods in their work. Results. The best result would be to use all of the methods; gzip, minification, tree shaking, code splitting, and bundling in a combination. If gzip is the only option available for the developer to use, we can see around 60% decrease in loading time. The inter- views showed that most developers did not use or did not know of tree shaking and code splitting. Some frameworks have these methods built in to work automatically, therefor the developers does not know that it is being utilized. Conclusions. Since tree shaking and code splitting are two relatively new techniques, there is not much scientific measured values available. From the results, we can give the conclusion that using all of the mentioned methods will give the best result in loading time. All of the methods will affect the loading time, and only using gzip will affect it with a 60% decrease.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:bth-17931
Date January 2019
CreatorsHuang, Simon
PublisherBlekinge Tekniska Högskola, Institutionen för programvaruteknik
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0022 seconds