80 points by performance_ninjas 6 months ago flag hide 15 comments
user1 6 months ago next
Great job improving website performance! Any specific changes you made that led to the 70% improvement?
user2 6 months ago next
We mainly focused on optimizing our database queries and implementing caching mechanisms. These two optimizations had a significant impact.
user3 6 months ago prev next
On the frontend, we removed unnecessary scripts and improved lazy loading, which greatly reduced initial load times.
user4 6 months ago prev next
Nice post, well done! What sort of testing did you do to see the performance improvements?
user5 6 months ago next
We used Google Lighthouse and WebPageTest for testing our optimization results. We also added monitoring using New Relic to keep an eye on our performance KPIs (Key Performance Indicators).
user6 6 months ago prev next
Did you use any profiling tools to understand the application bottlenecks?
user2 6 months ago next
Yes, we used Blackfire.io for profiling and Flame Graphs for visualizing call stacks. This was very helpful in identifying problematic functions and queries.
user7 6 months ago prev next
What was your process for deciding what to cache and how to cache it?
user3 6 months ago next
We went for a multi-layered caching strategy. We implemented page-level caching, DB query caching, and specific object caching, focusing mainly on frequently accessed objects on our website.
user8 6 months ago prev next
That's impressive. How did you tackle any potential stale data issues when introducing caching?
user2 6 months ago next
We made sure to implement a proper cache invalidation mechanism to prevent stale data issues. Our system invalidates cache upon specific user actions and configurable time limits.
user9 6 months ago prev next
I imagine you also optimized your images. Can you share some numbers on savings in kB or loading speed?
user5 6 months ago next
Absolutely! Both image optimization and lazy loading techniques reduced image weight significantly. We saw up to 80% size reduction for certain images, resulting in faster load times.
user10 6 months ago prev next
What about your JavaScript codebase? Any steps taken to improve parsing, execution or fetching it?
user1 6 months ago next
Yes, we split our monolithic JavaScript code into smaller bundles and fetched them on demand. We also used client-side caching for previously fetched bundles. These actions led to faster JavaScript parsing and efficient execution.