GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Concurrent workspace builder (opt-in) by tony · Pull Request #1067 · tmux-python/tmuxp

Conversation

@tony

@tony tony commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Add ConcurrentWorkspaceBuilder, an opt-in builder (workspace_builder: concurrent) that observes a window's pane readiness through one concurrent barrier instead of waiting pane-by-pane — addressing the serial per-pane wait that made loads scale with pane count (Very slow performance opening layouts/workspaces #1053).
  • Add an overridable ClassicWorkspaceBuilder._build_window seam so the variant overrides only per-window construction; classic builder behavior is unchanged (the full classic suite passes).
  • Honor workspace_builder_options.pane_readiness (auto/always/never) and fall back to the classic one-pane-at-a-time path when a later pane's start_directory depends on an earlier pane's command.

Changes

  • workspace/builder/concurrent.py (new): builder, readiness barrier, adaptive space-reclaim (no space for new pane with main-horizontal and a few panes #800), sequential fallback.
  • workspace/builder/classic.py: extract behavior-preserving _build_window seam.
  • pyproject.toml + builder/__init__.py: register/export the concurrent entry point.
  • Tests, docs (custom-workspace-builders guide + API page), CHANGES.

Supersedes #1056, re-homed onto the #1066 builder framework as a separate opt-in builder rather than changing the default. #1056's CLI progress / before_script / synchronize-panes follow-ons are intentionally out of scope here.

Test plan

  • uv run py.test --reruns 0 — full suite green
  • uv run mypy ., ruff check ., ruff format --check .
  • just build-docs — no new warnings

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@codecov

codecov Bot commented Jun 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.24852% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.50%. Comparing base (98af6d1) to head (01102ad).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
src/tmuxp/workspace/builder/concurrent.py 81.36% 18 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1067      +/-   ##
==========================================
- Coverage   82.55%   82.50%   -0.05%     
==========================================
  Files          31       32       +1     
  Lines        2768     2932     +164     
  Branches      518      550      +32     
==========================================
+ Hits         2285     2419     +134     
- Misses        346      364      +18     
- Partials      137      149      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tony
tony force-pushed the builder-concurrent branch from f36c706 to 5cb2b19 Compare July 4, 2026 14:08
@tony
tony force-pushed the master branch from 63172d2 to eeb6912 Compare July 25, 2026 17:00
tony added 3 commits October 24, 2026 04:49
@tony
builder(refactor[seam]): Extract _build_window from build
f3d2854
why: The per-window pane-construction body was inlined in
ClassicWorkspaceBuilder.build(), leaving no override point for a builder
that wants a different pane-creation strategy without duplicating the
window iteration, plugin hooks, focus handling, and build events.

what:
- Move the per-window pane loop into an overridable _build_window()
  that returns the window's focus pane
- Have build() call _build_window() and keep on_window_create,
  config_after_window, after_window_finished, focus, and window_done
  unchanged around it
- Add a doctest for the new seam
@tony
builder(feat[concurrent]): Add ConcurrentWorkspaceBuilder
d32b00c
why: Loading a workspace waited on each pane's shell prompt one at a
time, so a window with several panes paid the prompt-startup cost
serially even though tmux warms every pane's shell concurrently.

what:
- Add ConcurrentWorkspaceBuilder, an opt-in builder that creates a
  window's panes up front, waits for their prompts in one shared
  barrier, lays out once, then dispatches each pane's commands
- Port _pane_has_drawn_prompt and _wait_for_panes_ready (one
  shared-timeout polling loop, 10ms interval) from the source change
- Port _split_pane_reclaiming_space (reclaim layout space only on a
  no-space split failure) and the sequential fallback for panes whose
  start_directory depends on an earlier pane's command
- Respect workspace_builder_options.pane_readiness via the classic
  _pane_readiness_wait resolution; skip the barrier under never
- Register the `concurrent` entry point and export the class
- Register the module's doctests with the tmux-fixture set in conftest
- Add functional tests: multi-window/pane build, command dispatch,
  single-pass layout, readiness policy, space reclaim, sequential
  start_directory fallback
@tony
docs(builder[concurrent]): Document concurrent builder
01102ad
why: The new opt-in builder needs user-facing guidance and an API
reference page, and the change should be discoverable in the changelog.

what:
- Add a Concurrent builder section to the custom-workspace-builders
  guide and list it under Choosing an approach and Reference
- Add the concurrent autodoc page and link it from the builder index
  grid and toctree
- Add a What's new CHANGES entry under 1.74.0
@tony
tony force-pushed the builder-concurrent branch from 5cb2b19 to 01102ad Compare October 24, 2026 09:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@tony
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.