ST_GetFaceGeometry slow with faces with many holes
|Reported by:||strk||Owned by:||strk|
|Priority:||medium||Milestone:||PostGIS Fund Me|
In the wild I'm facing a face (no pun intended) with 7100 holes (9295 edges) which takes 1.5 seconds to come out from ST_GetFaceGeometry.
I've observed that ST_Polygonize(edge.geom) takes 0.5 seconds so it looks like ST_BuildArea is making GetFaceGeometry take 3 times as much as needed, at the bare minimum.
I guess we could assume topologies are valid and thus not bother doing what ST_BuildArea does to try at building areas, and rely to simply building rings and expect a single shell to exist, and consider all the others "holes".
See also #4680 for an idea to implement this internally.