Repository navigation
tala: route large compound diagrams within existing work limits - #2986
Merged
Merged
Conversation
Build a sparse orthogonal visibility graph for expensive routes, track crossings as routes are added, and reuse segment bounds during balancing. Count crossings between adjacent ranks with inversions to keep hierarchy ordering practical on dense diagrams. - sent from alixander's Codex
Keep the smaller public case and focused routing regressions under the race detector. Its instrumentation spends several minutes in placement for the larger nested case. - sent from alixander's Codex
Build hierarchy lanes within the container that owns the linked siblings. Reuse the regular port grid and routing search across diagrams, index accepted segments, and keep later packing moves clear of fixed routes. - sent from alixander's Codex
- sent from alixander's Codex
- sent from alixander's Codex
- sent from alixander's Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Human
AI
Fixes #2891.
TALA now renders the public example with 40 containers and 100 arrows on all three default seeds. Each previously exhausted the 120,000,000-unit search limit. The busiest search now uses 23,116,436 units. On all three seeds, every arrow is orthogonal and clears unrelated boxes.
How it works
The same orthogonal visibility graph and Dijkstra search route every arrow. TALA keeps the original lanes between hierarchy levels when a hierarchy belongs to one container or its estimated search cost fits the budget. For expensive hierarchies that span containers, linked siblings share local lanes and cross-container arrows use the ordinary port grid and edge waypoints. The estimate uses the hierarchy’s physical extent, grid spacing, and the number of arrows. The search guard still charges actual work.
The router indexes occupied segments, clears only visited search entries between arrows, and reuses bounds during balancing. Hierarchy ordering counts crossings between adjacent levels as rank inversions. A packing check prevents moving a box onto an existing wire.
What changes in the drawings
Existing E2E fixtures
On Apple Silicon, three paired runs over the 309 existing TALA E2E fixtures put the median time inside the 385 layout and routing calls at 11.99 s on the base and 11.98 s on the PR. Aggregate route-search work went from 396.8M to 201.6M units. Those engine timings exclude compilation and SVG rendering. The complete, unmodified
./e2etestspackage took a median of 73.6 s on the base and 72.0 s on the PR across two measured runs per version after warm-up, with the execution order reversed for the second pair. Individual fixtures can use more search work. The full Go suite and the TALA race suite pass.Video and build
The walkthrough shows the public 100-arrow case. It was recorded on the earlier revision. The compact-diagram behavior introduced afterward is described above.
tala-unified-routing.mp4
Use the macOS arm64 archive from the latest PR build to try the original sketch. Download this revision’s release archives.