Morningstar Interview Question

How would you troubleshoot a slow web application?

Interview Answer

Anonymous

Nov 10, 2024

Depends whats slow? Is the front end slow to load? Code Spitting with lazy code calls Implement gzip compression at Web Server Level Download all 3 Part Scripts such as fonts and library calls. Serve all assets from a CDN Is the backend slow to response? Debug logic o reduce database calls as much as possible. Many ORMs have n+1 problem, solve them Use threads in apis to code logic that is not required fior a response like email sending Make external third party api calls asynchornously so all calls happen t once, if they all are independant. Implement caching and cache invalidation logic