Repository navigation
perf(analysis): Intersect, Identity, Union and Symmetrical Difference work on several cores (#1252) - #1740
Conversation
… work on several cores (opengeos#1252) opengeos#1252 step 2, the overlay tools. Each of their three steps works item by item on `parallel::try_map_on`, and the output rows are made in order on the calling thread, so the output is the same as on one thread, bit for bit: - the overlay zones (a feature of several parts is a union), in `overlay_zones`, which Erase, Update and Split share; - each input feature's cut by the zones it meets (its part in each and its part outside them); - for Union and Symmetrical Difference, each zone's part outside the input polygons covering it. Cancel is looked at, and progress counted, item by item as before; one thread in the browser and below the usual threshold of features.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the diff against the surrounding code in Bugs: none found. The parallel closures are pure over shared read-only data, and the serial pass preserves row order. Security: none. No input handling changed; all lookups use Performance: no issues beyond a low-confidence question (about 20%). Overlay workers use Quality (nits, for the release quality pass):
AGENTS.md: compliant as far as I can tell. The work uses Already raised: none. Change sizeCompared with the base branch: the whole PR against main (merge base 2d47925 to PR head 91641d9).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
#1252 step 2, first part: the overlay tools (Intersect, Identity, Union, Symmetrical Difference) work on several cores. The polar-geometry stack that blocked them (#1347, #1348, #1349) merged on 7 November.
Measured in a release build on a Xeon Silver 4114 (40 threads), with 100,000 input polygons against 20,000 overlay polygons (64-vertex circles, overlapping):
How
Each of the overlay's three steps runs item by item on
parallel::try_map_on, and the output rows are made in order on the calling thread, as before:overlay_zones): a feature of several parts is a union. Erase, Update and Split share this step, so their zones are made on several cores too.The cut, the masks and the differences are the same code as before. It only moved into the closures.
The #1252 rules hold:
PARALLEL_FEATURES) and in the browser;rustgis_data::threads;Tests
overlay_on_several_threads_is_overlay_on_oneruns all four tools on 1, 2, 7 and 16 threads and compares every row's geometry and attributes. Its data covers 600 input polygons against 200 overlay polygons, overlay features of two overlapping parts, and input features without geometry. The existing overlay, Erase, Update and Split tests pass unchanged.No visible UI change.
Summary by CodeRabbit