DEV Community

Meat Boy
Meat Boy

Posted on

What is the best performance tweak for server/frontend side of application you made?

Like in the title, what are your tips for optimizing frontend/backend? Minimization of files, indexes on db, cache everywhere and ...? ;)

Latest comments (3)

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Removing React

Collapse
 
meatboy profile image
Meat Boy

😂

Collapse
 
sannajammeh profile image
Sanna Jammeh • Edited

For Firebase, if you haven't updated to V9 already. Lazy import not commonly used packages for example realtime-database and shave 50-100kb off your bundle size. And upgrade to V9 already! 😅

For React specifically. When making requests, abandon useEffect+ fetch and install SWR. Saves you a ton of hassle both in DX and UX. Caches requests for you leaving a single hook acting as a global data store for that request. Also use optimistic updates with SWR mutate to update the UI before you've sent a request to change or create.