You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workspaces and Launches recount every workspace and reread every run's jobs on each load #230
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:_counts runs once per workspace through runs._grouped, 0.51 s. Its load_jobs walks each workspace's folders and calls load_job 2008 times, 0.32 s, and its _launched_here compares 101 workspaces with 200 records, 0.13 s.
Both pages:_held_launches takes 0.28 s, of which runs._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.
/workspaces and /launches render the same HTML as main on the same data.
On the profile above, Workspaces takes under 0.3 s warm.
Activity