Repository navigation
fix(plugins): #1738 follow-ups: fuzz lock, one notice part for cut trees, a UI test for the note (#1546) - #1754
Conversation
…r cut trees, a UI test for the note (opengeos#1546) - fuzz/Cargo.lock lists unicode-normalization under rustgis-plugins (and quick-xml under rustgis-data), so `cargo deny --locked` in the fuzz workflow takes it again. - Trees cut in one answer share one part of the warning, with the count, the limit once and each tree's given nodes ("Never silent"). - A kittest finds the note under a cut tree's rows and under an empty search, and none under a tree within its limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the full diff, the base-branch AGENTS.md, and the surrounding code in Bugs
Security
Performance
Quality
AGENTS.md
Prior concerns left alone: 0 (no prior review threads). Change sizeCompared: the whole PR against main (merge base 0c44ff6 to PR head e42d7cb).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
Follow-up to #1738 (#1546), which was merged before its last review round. This carries the points from that round.
What changes
fuzz/Cargo.lockis updated. fix(plugins): a panel tree holds 20,000 nodes and says when it cuts (#1546) #1738 movedunicode-normalizationfromrustgis-ui-eguitorustgis-plugins, and the fuzz lock still listedrustgis-pluginswithout it (review thread). The fuzz workflow's first job runscargo deny --manifest-path fuzz/Cargo.toml --locked …, and--lockedrefuses a lock that needs updating. With the lock on main,cargo metadata --manifest-path fuzz/Cargo.toml --lockedfails ("cannot update the lock file … because --locked was passed"), and with this one it passes.cargo update -p rustgis-pluginsinfuzz/also addsquick-xmlunderrustgis-data, which the lock had lost track of on main before fix(plugins): a panel tree holds 20,000 nodes and says when it cuts (#1546) #1738.cargo check --locked --binsinfuzz/builds.2 tree(s) cut: only the first 20000 nodes are kept, the most a tree holds: catalogue (20001 nodes given), places (20002 nodes given).a_cut_tree_says_so_under_its_rows_and_an_empty_search(kittest) opens a plugin's panel, gives its treeMAX_TREE_NODES + 1nodes, and finds the note, with the count given and the limit twice, under the rows and under a search for the node left out ("Nothing matches."). A tree given 3 nodes after that shows no note.Measurement: applying a 20,000-node answer
This answers the performance question:
PanelState::applyruns on the thread that ran the plugin's command, which on the desktop is the UI thread. The measurement used a throwaway test, not in this PR, in the workspace's test profile on Windows. It ran three times over 25 branches of municipality-like labels with accents, with ids and counts.applySo the largest answer a tree takes costs about three 60 fps frames, once, when the plugin sends it (usually as the panel opens), not at every frame. Folding the labels takes about 12 ms of the 38. A path that skips decomposition for ASCII characters would save about 6 ms of that, which is too little to be worth a second folding function, so it isn't done. The work is bounded by the limit. Moving
applyoff the UI thread would change how every plugin command's answer reaches the panel, a larger change and not part of this PR.Screenshots
These are rendered with the same wgpu renderer the
ui_shotexample uses, by a throwaway test (not in this PR), over a tree of 5 regions, 27 states and 800 municipalities each (21,632 nodes). The warning in the status bar is the new single part.The note under the rows:
A search for a municipality of the last state, left out at the limit:
Tests
a_tree_cut_at_its_limit_says_so(plugins) now also cuts two trees in one answer and checks the single part.a_cut_tree_says_so_under_its_rows_and_an_empty_search(ui-egui) is new.Locally (Windows):
cargo fmt --checkpasses, and so doescargo clippy -p rustgis-plugins -p rustgis-engine -p rustgis-ui-egui --all-targets -- -D warnings. The tests ofrustgis-pluginsand of therustgis-ui-eguilibrary pass too.cargo denyisn't installed here, so the lock was checked withcargo metadata --lockedas described above. Main doesn't build at the moment:crates/engine/src/cmd/layout.rspasses&[]tolegend_sizes_mm, whose signature changed in #1739. #1751 fixes that. The clippy run and the test runs above had #1751's one-line change applied locally, which this PR doesn't include, so this PR's CI fails on main's error until #1751 is merged.🤖 Generated with Claude Code
Summary by CodeRabbit