Skip to content

perf: open the tree root in a load worker - #335

Merged
henryiii merged 1 commit into
mainfrom
perf/open-root-in-worker
Nov 21, 2026
Merged

henryiii merged 1 commit into
mainfrom
perf/open-root-in-worker

Conversation

@henryiii

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

The TUI tree no longer opens its spec in the constructor. Without a root from the caller, the tree shows a placeholder root (the spec) and opens the spec in the load worker. When the open completes, the root takes the opened node, so path:key to a histogram, branch or TTree needs no special case.

  • Fixes a remote url:key to a histogram or a branch: it was a LazyRoot, which failed with "did not open as a folder".
  • A local spec given to Browser(path) without a root does not block the first paint.
  • A failed load (open or listing) shows the node as failed, with a notification. The next expand tries again.
  • Before the open completes, jump, mark, select and Dump & Quit do nothing.
  • The tree closes a root that it opened, on unmount. A root from the caller (browse for a local spec) stays with the caller, so the early CLI error is kept.

LazyRoot is now only for the files of a Directory. I ran the TUI tests with an extra 0.3 s delay in the open, and added wait_for_tree to the tests that raced.

Refs #322

The tree no longer opens a spec in its constructor. It shows a placeholder
root and opens the spec in the load worker, then uses the opened node. A
remote path:key to a histogram or a branch now shows and plots, as it is
no longer a LazyRoot. A failed load shows as failed and tries again on the
next expand. The tree closes a root that it opened.

Refs #322

Assisted-by: ClaudeCode:claude-opus-5-5
@henryiii
henryiii marked this pull request as ready for review November 21, 2026 02:31
@henryiii
henryiii merged commit 93558f8 into main Nov 21, 2026
12 checks passed
@henryiii
henryiii deleted the perf/open-root-in-worker branch November 21, 2026 02:31
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