Repository navigation
fix(layout): look at Cancel while a table or chart reads its layer, and sort a table's text faster - #3497
Conversation
…nd sort text once-lowered
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the diff, the base-branch AGENTS.md, and the surrounding code (the render table path, the chart callers, the export closure, Bugs
Security
Performance
Quality
AGENTS.md
Checked and left alone
Change sizeCompared with the base branch (main, merge base a44616f to PR head 4e516b1); this is the whole PR, not the latest push.
|
…t a kept sort row gains
|
Answers to the review of
The |
Code reviewI found no bugs, security issues, or AGENTS.md breaks in this PR. I could not compile or run the tests, so the review is by reading the code. Bugs: none found. Confidence: high.
Security: none found. Performance: no regression found. Confidence: medium-high.
Quality:
AGENTS.md: no break found. Confidence: high.
Twins checked:
Earlier concerns: none. Change sizeCompared with the base branch (merge base a44616f to PR head 6b7c7a0), the whole PR against
|
…ending is not for a cancellable run
Code reviewVerdict: no blocking findings. I read the diff, the base-branch AGENTS.md, the callers in BugsNone found. What I checked:
SecurityNone. Performance
Quality
AGENTS.mdNo violations found in the changed files. Checked: no Notes (low confidence)
Change sizeCompared with main (merge base a44616f to head 128aad3).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Prior reviews
Checked twins
I could not run tests (no shell in this review). The timing and test-count figures in the PR are the author's claims. Change sizeCompared with main (merge base a44616f to PR head 128aad3). Files changed: 4 (0 added, 4 modified, 0 removed, 0 renamed). Size before 298.9 KB, after 305.9 KB, total change +7.0 KB.
|
|
On the other points of the review of |
Summary
Drawing a layout page reads every row of a layer for a sorted table and for a chart. Neither read looked at Cancel, so a cancel asked for during an export waited until the page was drawn. Timing the reads also showed that a sort by text lowercased both texts on every comparison, which took up to 45 s over two million rows.
TableListing::first(sorted) andchart_data_withlook at Cancel every 4096 rows. A cancelled table read stops with the rows kept so far, and a cancelled chart read is no data. The page is then refused as cancelled (finish_legends), so nothing is written.Surfaces: every layout and report drawing shares these two reads. Cancel reaches a drawing whose run installs one, as the desktop's background export does; where none is installed, as in the Layout view and the browser, the look does nothing and only the sort's speed changes. No command, parameter or saved format changes.
Not in this PR: the Layout view still draws its page on the interface thread, so a very large sorted table is read there; it is faster with this change, not moved off the thread.
Testing
Time of one sorted read,
limit500, 2,000,000 rows, a development test build withrustgis-mapandrustgis-dataatopt-level = 3(not a release build; the timing test is not committed):New tests, seen failing before the fix:
a_tables_sort_looks_at_cancel_between_rows,a_charts_read_looks_at_cancel_between_rows.a_tables_sort_of_text_keeps_the_comparators_orderpins the order againstcmp_values. The cancellation sweeps' layout now holds a sorted table and a chart.cargo fmt --check,cargo clippywith-D warnings, doctests,cargo xtask layersandschema --checkpass.cargo nextest run: 11675 passed, 8 failed, 29 skipped, one DuckDB test left out. The 8 (sevenrustgis-geolibretests andline_strokes_editor_edits_one_class) also fail onmainon this machine.UI evidence
No visible UI change.
Related issue
Closes #3493
Summary by CodeRabbit