Repository navigation
Closed
Feature
Copy link
Labels
P2Planned: limited in scope, has a way around it, or a missing featureenhancementNew feature or request
Description
Priority
medium. The cause is in the routes. The backend gains one cheap change key.
Components
- app/nullius (backend)
- app/web (routes)
- templates and static files
- docs and the site
- catalogue (benchmarks, agents, capabilities)
- the standard (ports, kits, relay, runs)
- CI, workflows and skills
Today
Measured on main with a synthetic profile: 100 workspaces, 2000 Harbor jobs, 200 run records. Warm, Workspaces takes about 0.65 s on the server and Launches about 0.46 s. A cProfile run, where times are about twice as long, shows:
- Workspaces:
_countsruns once per workspace throughruns._grouped, 0.51 s. Itsload_jobswalks each workspace's folders and callsload_job2008 times, 0.32 s, and its_launched_herecompares 101 workspaces with 200 records, 0.13 s. - Both pages:
_held_launchestakes 0.28 s, of whichruns._every()is 0.21 s. It walks every run record's jobs folder and parses 800 jobs on every request.
Nothing on disk changed between those loads.
Wanted
While a workspace's jobs and the run records are unchanged, the counts and the list of launches are not computed again. A job added, removed or rewritten, a run that ends, and a change to a workspace's roots show on the next load. A job still running is computed as today.
Acceptance
-
runs._every()reuses its result while the records and their jobs folders are unchanged and every job it read has finished. - A closed workspace's counts are reused while its roots, its jobs and the run records are unchanged and its jobs have finished. The open workspace is computed on each load.
- A job added, removed or rewritten, a run that ends, a launch added to a workspace and a run record removed show on the next load.
-
/workspacesand/launchesrender the same HTML as main on the same data. - On the profile above, Workspaces takes under 0.3 s warm.
Dependencies and related
- Pages get slow with many workspaces, runs and trials #214 and perf(runs): stop reading every trial of every job on each page #215: perf(runs): stop reading every trial of every job on each page #215 made a job's load cheap and left this count out.
- Launches and Workspaces: every row carries its own hidden copy of a dialog #229: the same two pages, their dialogs.
Metadata
Metadata
Assignees
Labels
P2Planned: limited in scope, has a way around it, or a missing featureenhancementNew feature or request
Activity
perf(web): keep the launches and each workspace's counts until their …