Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How a Tester’s Question Led to Lazy‑Loading OCR Packs in PureHub

Описание и применение

Тестировщик заметил задержку при запуске PureHub из-за загрузки OCR. Переписали компонент OCR на ленивую загрузку по маршруту, уменьшив размер пакета на 30 % и ускорив старт приложения.

Задача

PureHub’s OCR initialization added a noticeable delay on first launch, hurting the one‑handed mobile experience.

Результат

Users now experience a faster app start, and OCR packs are fetched only when needed, keeping the shared mobile UI lightweight.

Рабочий процесс

  • 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.

Доказательства

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.

Источник

  • Дата записи: 2026-09-07T13:23:02.758Z