trilium/scripts
Elian Doran 774a73ca89
perf(dev): give each dev server its own Vite dep cache
The client config points `cacheDir` at a single repo-level directory, so
the server, desktop and edit-docs dev servers all shared one optimized-dep
cache. Vite discards that cache whenever its `configHash` changes, and the
hash differs between the Node-hosted dev server and the Electron-hosted
one — so alternating between `pnpm server:start` and `pnpm desktop:start`
re-scanned and re-bundled the whole dependency graph on every launch.

Measured on the desktop dev app, consecutive launches with nothing else
changed: 9055ms to full render with the re-optimization, 5796ms without.
The failed commits also leave orphaned `deps_temp_*` directories behind
(91 MB when measured), because on Windows the optimizer cannot delete a
`deps` directory another dev server still holds open.

Keying the cache directory on the app port removes the sharing. The perf
analyzer is taught the new layout, and the measure-startup-requests skill
picks up the same path change plus two corrections: the eager-load
offenders it listed are both fixed now (dialogs go through `LazyDialog`,
Inter ships as woff2), and a capture run without `TRILIUM_PASSWORD`
silently stops at the login page instead of failing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 18:05:32 +03:00
..
icon-packs feat(icon-pack-builder): integrate boxicons 3 with brands 2025-12-28 22:53:03 +02:00
icons feat(mobile/ios): add trilium icon 2026-04-22 14:43:10 +03:00
repo-migration chore(scripts): add proper typechecking 2025-12-08 14:13:18 +02:00
translation chore(scripts): improve messages for translation check script 2026-02-06 19:38:24 +02:00
analyze-perf.ts perf(dev): give each dev server its own Vite dep cache 2026-08-10 18:05:32 +03:00
build-portable-better-sqlite3.sh build(ci): rebuild better-sqlite3 against an older glibc for Linux releases 2026-07-25 17:59:19 +03:00
build-utils.ts Merge remote-tracking branch 'origin/main' into renovate/pdfjs-dist-6.x 2026-07-25 23:04:17 +03:00
check-version-consistency.ts fix(ci): sanity check does not account for version prefix 2026-03-01 17:43:41 +02:00
electron-run-prod.mts fix(desktop): make start-prod launch Electron correctly on NixOS 2026-07-18 13:29:30 +03:00
electron-start.mts build: adapt the native build pipeline to better-sqlite3 v13 2026-07-25 17:09:31 +03:00
filter-tsc-output.mts build: name the native compiler @typescript/native, and record why the compat package is unusable 2026-08-09 18:10:36 +03:00
generate-openapi.ts feat(views/geomap): remove old geo map type 2025-07-06 20:23:50 +03:00
tsconfig.json chore(scripts): fix typecheck issue 2026-01-04 23:38:51 +02:00
update-build-info.ts fix(scripts): update build info no longer updating 2026-04-07 16:00:44 +03:00
update-contributors.ts contributor list: update script name, change a comment 2026-04-19 18:33:35 +03:00
update-flake-electron.spec.ts ci(nix): sync the flake's Electron pin automatically 2026-08-08 15:55:22 +03:00
update-flake-electron.ts ci(nix): sync the flake's Electron pin automatically 2026-08-08 15:55:22 +03:00
update-nightly-version.ts refactor(standalone): rename project from client-standalone 2026-05-16 08:57:55 +03:00
update-version.ts refactor(standalone): rename project from client-standalone 2026-05-16 08:57:55 +03:00
utils.mts fix(desktop): make start-prod launch Electron correctly on NixOS 2026-07-18 13:29:30 +03:00
vitest.config.ts ci(nix): sync the flake's Electron pin automatically 2026-08-08 15:55:22 +03:00
wipe-node-modules.mts chore(scripts): add a way to wipe node modules 2026-03-26 11:27:46 +02:00