DEV Community

KAIDI
KAIDI

Posted on

Recommendations to speed up a web application

Hello there,

The actual web development major frameworks like angular,react, vue and other relie on some external libraries and every time we want to use an external library means more of code behind the scene , do you think this has an influence on the speed of the web application and what do you recommend to speed up a web app ? (Not using a framework is not a choice😢)

Top comments (4)

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

First off, not using a framework is always a choice. It's just a matter of whether the extra effort required to implement the parts you actually need (which I can almost guarantee are a small percentage of the whole framework) is worth the often significantly smaller and faster application that you'll get from not using the framework. Most people don't feel it's worth it, albeit partly because they don't realize how comparatively easy it is to throw together a minimalistic MVVM or MVC layer using just HTML templates (that is, the <template> tag) and vanilla JS that will work in a vast majority of modern web browsers and cover a significant percentage of what people actually need from most frameworks.

As far as just speeding up a web app, it depends on what you mean by 'speed up'.

Load times can be reduced by bundling, or if you can be certain all your users are on relatively fast connections, even more in some cases by not bundling but using an async module system like Require.JS or Alameda, and by properly utilizing a service worker and keeping your dependencies to a minimum (and properly balancing what needs to be pre-computed versus what can be generated at runtime, both server side and client side).

Overall responsiveness can be improved by reducing the number of reflow and redraw events that happen (which is often challenging to do with some frameworks), properly caching resources, and correctly using promises to handle externally asynchronous tasks.

Actual performance can be improved by properly offloading computationally intensive tasks to web workers (and possibly WASM).

Collapse
 
kamo profile image
KAIDI

thanks Austin for your anwer, for using a framework or not it's a team decision, I don't think that they're ready to forget all their loved frameworks and start writing Vanilla js, your suggestions is all what I need , I have started implementing some of theme and I see the difference

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ

Why is not using a framework not a choice?

Collapse
 
kamo profile image
KAIDI

It's a team decision, unless I convince them to do otherwise 😢