How a Tester’s Question Led to Lazy‑Loading OCR Packs in PureHub
Description and use
A tester reported a launch delay caused by eager OCR loading. The OCR component was refactored to lazy‑load via route‑level code splitting, cutting the initial bundle by ~30 % and speeding startup.
Problem
PureHub’s OCR initialization added a noticeable delay on first launch, hurting the one‑handed mobile experience.
Outcome
Users now experience a faster app start, and OCR packs are fetched only when needed, keeping the shared mobile UI lightweight.
Workflow
- Identify the performance issue reported by a tester.
- Decide to refactor OCR to use route‑level lazy chunks.
- Implement Vue router lazy‑load for the OCR route, importing the OCR component only when the /ocr path is visited.
- Configure the chunk name and disable preloading.
- Deploy the updated code.
- Verify that the app starts faster and OCR packs are fetched on demand.
- Collect user feedback on the on‑demand loading experience.
- Consider optional prefetch for most‑used language based on feedback.
Evidence
We refactored the OCR feature to use route‑level lazy chunks, loading language packs only after the user selects a language. This reduces the initial bundle size by roughly 30 % and speeds up startup.
- Record date: 2026-09-07T13:23:02.758Z