The Challenge
Offline POS terminals needed to sync data down from the central system, and that sync was painfully slow. Three problems compounded each other: tables were downloaded one at a time in sequence, so total sync time was the sum of every table added together; testing the sync polluted the live production database with fake data, because there was no isolation between a test run and the real thing; and image downloads crawled, because they were routed through a web-service middleman instead of coming straight from storage.
The Approach
Each bottleneck was addressed at its root, reusing the existing infrastructure rather than replacing it.
- Introduced a staging local database by dynamically cloning tables through the existing Entity Framework middleware — giving sync (and testing) a clean, isolated place to work without touching production data.
- Added multi-threading for parallel downloads, so tables come down simultaneously instead of one after another.
- Pointed image downloads directly at blob storage, cutting out the slow web-service middleman entirely.
The Result
The impact was structural: sync time is now set by the single largest table, instead of the cumulative total of every table processed in sequence. Because downloads run in parallel, adding more tables no longer stacks more waiting; testing no longer contaminates production; and images arrive quickly straight from storage. A sync that used to be a slow, risky bottleneck became fast and safe.