Introduction
When it comes to your website, success isn’t only about flashy features or modern frameworks. It’s about speed, reliability, and the ability to perform under real-world conditions. Sometimes, the biggest wins come from the smallest, smartest changes.
This is the story of how a subtle issue on legacy hardware taught us an important lesson about performance, and how a targeted optimization turned a frustrating slowdown into a seamless, speedy experience.
The Challenge: From Slow to Slower
Our app had always been fast enough. On most modern desktops, login and initial load took around 10–20 seconds. On older devices, like the thousands of iPad Mini 4s used by many of our client’s warehouse staff, load times could creep toward a minute. Not ideal, but tolerable.

One day, without warning, our app’s performance was suddenly, inexplicably throttled on all of these devices. Those minute-long logins ballooned into over 3 minutes. The hardware couldn’t be updated further, and connectivity in these locations was often unreliable. What should have been a quick start to the day became a serious productivity bottleneck. Staff members were asking to have their iPads upgraded – a massive financial sink, with no guarantees the problem would not happen again.
The Investigation: A Hidden Bottleneck
We traced the issue to IndexedDB writes. Our app had been writing 10,000+ records into the database during login—every time. Normally, this was fast enough. But after the mysterious change, WebKit’s performance on these devices dropped so severely that the entire login process stalled. This issue only happened with the iPad mini 4s – not the newer iPads, and not the desktops or cellphones.
We didn’t want to sacrifice offline capability. Warehouses depend on the app even with spotty or absent network access. But it was clear that our approach to data persistence needed to change, and there was no time for a complete replatform – our client needed immediate improvements now .
The Solution: Restructure, Don’t Remove
We reimagined the flow.
Instead of writing everything to IndexedDB immediately, we made a critical change: we wrote a single record on load, then used in-memory Map and Array structures to manage the data throughout the session. We refactored into wrappers that abstracted the difference.
This kept offline functionality intact—data could still be synced to disk as needed— but removed the costly delay from the login process.
The result was stunning.
The Result: From 3 Minutes to 3 Seconds
Login times on iPad Minis dropped from over 3 minutes to under 5 seconds. Even modern devices saw gains. By removing the dependency on immediate disk writes, we made our app faster and more responsive across the board.
- Legacy devices: ~3 minutes → <5 seconds
- Desktops: 10–20 seconds → 1–3 seconds
- No impact on offline capability
- Cleaner, more predictable state management
What began as a fix for a legacy problem became a full-on performance boost for everyone.
Lessons Learned
- Micro-optimizations matter: Even small, targeted changes can have massive effects on performance.
- User context is key: Real users don’t always have modern hardware or perfect connections.
- IndexedDB is not real-time: Treat it as a background sync layer, not a live part of your session loop.
- Bottlenecks are opportunities: The biggest performance gains often come from the hardest constraints.
Need to Optimize Your App?
Performance issues can be subtle, and the right fix isn’t always obvious. But whether you're targeting legacy hardware, aiming for offline capability, or just want a faster experience for everyone, we can help.
We build fast, accessible, and reliable web applications that are ready for the real world.