-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
backendRelating to tRPC, DB, APIRelating to tRPC, DB, APIfrontendRelating to Next.js, PWARelating to Next.js, PWAperfA performance enhancementA performance enhancement
Description
Summary
There are a few performance enhancements we can apply to make our backend procedures a little speedier, as well as cache on the frontend to avoid unnecessary calls to the backend.
Backend Optimizations
- The weekly job currently processes restaurants sequentially. You can improve this by running them in parallel.
- The daily function already uses
Promise.allSettledbut could benefit from connection pooling optimization.
Frontend Optimizations
- Increase stale time and add selective refetching to tRPC
- Use Zustand to store information on the frontend and avoid repetitive fetching. You will need to decide what information exactly should be stored, such as meal information, favorites, ratings, etc.
Memoize the following
- Date calculations in render body
- No memoization of derived data
- tRPC query could have better caching
See this DeepWiki search for more information.
Metadata
Metadata
Assignees
Labels
backendRelating to tRPC, DB, APIRelating to tRPC, DB, APIfrontendRelating to Next.js, PWARelating to Next.js, PWAperfA performance enhancementA performance enhancement