Skip to main content

3 posts tagged with "performance"

View All Tags

Optimizing Platform Performance with Redis & TTL-Based Caching

· 2 min read
JavaScript Dev

Overview

As election and political data expanded, performance bottlenecks became visible—especially on pages rendering historical trends and analytics. I adopted Redis-based caching with time-based expiry to ensure:

  • Faster load times
  • Reduced DB load
  • Controlled freshness of data

This post details my approach using NestJS, Redis, and TTL strategies.


Caching & Performance Optimization with Redis in NestJS

· 2 min read
JavaScript Dev

Overview

When building a platform that relies on statistical analysis and deep comparisons, response time can quickly become a bottleneck. In this article, I’ll walk through how I integrated Redis with NestJS to reduce computation time and database load on performance-heavy endpoints.

I implemented caching on frequently accessed data like:

  • Party trends across elections
  • Leader performance history
  • Poll summaries
  • Government composition data

Performance Improvement by useCallback, useMemo and React.memo

· 4 min read
samundrak
JavaScript Dev

React is fast on its own, It does a lot of work to make our web app more fast and smooth and on top of that today's browser engine is doing a perfect job to optimize the code we throw to them. v8 has TurboFan which does some next level of optimization. These are the things that are done for us by someone else but there is still a lot of things that we can do to improve our application. I will not write about web application performance and optimization process here because this note was specially written for optimizing React apps which uses hooks and I mentioned other things because sometimes we do overengineer in the name of performance, which I think I do sometimes (Premature Optimization).

I use React hooks a lot and many times I get stuck thinking about how I can make it work faster, which hook can be useful here to store data, memoize data, etc.