diff --git a/AGENTS.md b/AGENTS.md index 1272c04..c5da482 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,6 +18,7 @@ the behavior you are changing: | Completed SOLID audit evidence | [SOLID audit record](docs/SOLID.md) | | Completed Rust audit evidence | [Rust audit record](docs/rust.md) | | Current responsiveness work | [Responsiveness plan](docs/plans/responsiveness-burndown.md) | +| Staged Tauri performance experiments | [Experiment measurements](docs/performance/tauri-experiments/README.md) | | Responsiveness audit evidence | [Rust performance audit](docs/rust-slop-performance-audit.md), [Last.fm interaction audit](docs/lastfm-interaction-audit.md), [type-ahead audit](docs/typeahead-performance-audit.md) | ## Invariants diff --git a/apps/desktop/.gitignore b/apps/desktop/.gitignore index a547bf3..93f0698 100644 --- a/apps/desktop/.gitignore +++ b/apps/desktop/.gitignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist dist-ssr +performance-dist *.local # Editor directories and files diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 8d75017..6509e3c 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -7,7 +7,7 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "oxlint --deny-warnings", - "test": "node --test --experimental-strip-types test/ui.test.ts test/gateways.test.ts && vitest run test/interactions.test.tsx", + "test": "node --test --experimental-strip-types test/ui.test.ts test/gateways.test.ts && vitest run test/interactions.test.tsx test/mainEntry.test.tsx test/importQueue.test.ts", "preview": "vite preview" }, "dependencies": { diff --git a/apps/desktop/performance/check-startup.mjs b/apps/desktop/performance/check-startup.mjs new file mode 100644 index 0000000..81c45af --- /dev/null +++ b/apps/desktop/performance/check-startup.mjs @@ -0,0 +1,15 @@ +// Check browser resource observations, including Vite's conditional-preload regression. +import assert from 'node:assert/strict' +import { readFile } from 'node:fs/promises' +const report = JSON.parse(await readFile(process.argv[2], 'utf8')) +assert.equal(report.commit, process.argv[3], 'Use observations from the candidate being reviewed') +for (const label of ['main', 'lastfm-importer']) { + const samples = report.samples.filter(sample => sample.window === label) + assert(samples.length >= 3) + for (const sample of samples) { + const unwanted = label === 'main' ? 'LastFmImporter-' : 'App-' + assert(!sample.resources.some(resource => resource.name.startsWith(unwanted)), `${label} loaded the other window`) + if (label === 'lastfm-importer') assert(sample.resources.some(resource => resource.name.startsWith('LastFmImporter-') && resource.name.endsWith('.css')), 'Importer CSS was not loaded') + } +} +console.log('Both window entries load only their own view and required importer CSS') diff --git a/apps/desktop/performance/importer.html b/apps/desktop/performance/importer.html new file mode 100644 index 0000000..f725bf6 --- /dev/null +++ b/apps/desktop/performance/importer.html @@ -0,0 +1 @@ +