Opened 3 years ago
Closed 3 years ago
#4952 closed enhancement (fixed)
Speed up ring building in ValidateTopology
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.2.0 |
Component: | topology | Version: | |
Keywords: | Cc: |
Description
The most expensive step in topology validation at the moment is building all rings.
In a topology with 20557 rings the current code on my machine takes 114 seconds to compute them all.
Current code makes 20577 iterations of a loop, and each iteration performs an INSERT and a DELETE statement, among other things.
Change History (3)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
New attempt looks promising: https://gitlab.com/postgis/postgis/-/merge_requests/46 Builds all rings in 25 seconds rather than 114 seconds
Note:
See TracTickets
for help on using tickets.
Additional operation in each iteration is the actual build of ring.
Temptative improvement (computing all rings in a single statement):