r/javascript • • Mar 20 '22

A real-world example of Improving JavaScript performance

https://www.the-koi.com/projects/an-practical-example-on-improving-javascript-performance/
51 Upvotes

11 comments sorted by

View all comments

2

u/iamnearafan Mar 29 '22

I know it's not applicable to all use cases but I recently used Redis cache to improve the speed of my site's time to first byte by about 95%. If it's useful I can share it, but you can have an essentially real time Redis cache that can help improve backend Javascript performance massively. Obviously uses a lot of memory sometimes though.

1

u/No-Onion-8207 Mar 29 '22

That sounds amazing! 😁 I will try it also for my project 😁 does redis also work for Frontend js?

1

u/iamnearafan Mar 29 '22

You'd have to use a server side rendered website for this to work. If you're using a framework, it's harder. The idea is that on the server side, you often do a lot of processing. With Redis, you can save all the output of the process and skip the processing altogether if a cached version exists. I wrote about it here if you're interested.