Workspace builder: bulk set-option helper + 10ms readiness polling - #1070
Workspace builder: bulk set-option helper + 10ms readiness polling#1070tony wants to merge 1 commit into
set-option helper + 10ms readiness polling#1070Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1070 +/- ##
==========================================
+ Coverage 82.56% 82.64% +0.08%
==========================================
Files 31 31
Lines 2770 2783 +13
Branches 518 520 +2
==========================================
+ Hits 2287 2300 +13
Misses 346 346
Partials 137 137 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
set-option helper + 10ms readiness polling
why: Workspace loads wait on shell prompt readiness with a 50ms poll, coarser than tmux's 50-150ms shell-ready band, so readiness is noticed late. Separately, the classic builder fires one set-option per loop iteration across four hot loops (session options, global_options, per-window options, options_after) with no shared seam for a future batched dispatch. what: - Tighten _wait_for_pane_ready interval default from 0.05 to 0.01 so prompt readiness is detected sooner (same condition). - Add ClassicWorkspaceBuilder._bulk_set_options(items, *, target, scope_flag): mirrors set_option's True/False -> on/off normalization and propagates errors via handle_option_error. - Route the four set-option loops through the helper: session (-s, session_id), global (-g, None), per-window (-w, window_id), options_after (-w, window_id). - Add tests/workspace/test_builder_bulk_options.py covering scope application, on/off normalization, empty no-op, and OptionError propagation. Salvaged from PR #1040, adapted from the pre-refactor single-file builder.py onto the builder package's classic.py. The helper body issues N round-trips today; the batch-shaped API defers the perf gain to a future libtmux batching API.
d736069 to
8b2e68b
Compare
|
Automated review finding. Recorded here so it is not lost. Nothing has been pushed to this branch and no fix is applied — this is a note, not a change request. Session-scoped
|
Summary
ClassicWorkspaceBuilder._bulk_set_options, a batch-shaped helper routing the fourset-optionloops (session, global, per-window, options_after) through one entry point._wait_for_pane_readypolling interval 50ms → 10ms.Note
The helper is forward-compat plumbing: today it is a plain loop producing identical tmux commands; the batch speedup lands once libtmux exposes a batch API. The polling tweak is the only current perf change.
Changes
workspace/builder/classic.py, tests, CHANGES.Supersedes #1040, rebased onto the
builder/classic.pypackage.Test plan