Skip to content

perf(desktop): speed up local-server install — uv on Windows, background Playwright/Chromium with mirror fallback - #32

Merged
Luhaozhu merged 1 commit into
mainfrom
perf/local-install-speedup
Jul 27, 2026
Merged

perf(desktop): speed up local-server install — uv on Windows, background Playwright/Chromium with mirror fallback#32
Luhaozhu merged 1 commit into
mainfrom
perf/local-install-speedup

Conversation

@Luhaozhu

Copy link
Copy Markdown
Contributor

What

Speeds up the desktop local-server bootstrap on fresh machines, where installing every dependency from official sources could take 10+ minutes on slow networks.

Windows: install Python dependencies with uv

  • install-local-server.ps1 now bootstraps uv into the venv and routes all dependency installs (server, mem0, script/document tools, editable install) through uv pip install — parallel downloads plus a much faster resolver, matching what the macOS bootstrap already does.
  • If uv can't be installed or an install step fails, each step falls back to the original pip install path automatically, so reliability is unchanged.

Both platforms: Playwright/Chromium moves to a background install with mirror fallback

  • pptxgenjs + playwright + the ~130 MB Chromium download no longer block the install: the core service now finishes installing and starts first, while the optional document tools install in a detached background task (log: node-tools-install.log, with a lock file to prevent duplicate runs).
  • The background task probes registry.npmjs.org; when it is slow or unreachable it switches to the npmmirror registry and PLAYWRIGHT_DOWNLOAD_HOST mirror for the Chromium binary. A failed official-host Chromium download is retried once via the mirror.
  • Failure behaviour is unchanged: Word/Excel/PPT generation keeps working, advanced PDF rendering uses its existing fallback until Chromium is available.

Testing

  • npm run test:scripts in desktop/ — 16/16 pass
  • bash -n on the modified shell script

…und Playwright/Chromium with npmmirror fallback
@Luhaozhu
Luhaozhu merged commit e214a8b into main Jul 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant