#4294 closed enhancement (fixed)
ST_AsMVTGeom: Do resolution check before deserializing
Reported by: | Algunenano | Owned by: | Algunenano |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.0.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
In #4161 I added a shortcut to drop small lines and polygons before any call to the simplification process. I've now noticed that this check could be done before deserializing the geometry since all you need is the geometry type and bounding box.
I'll try to move this check to ST_AsMVTGeom
(C function) before the lwgeom_from_gserialized
call and measure its impact in this kind of input.
Note:
See TracTickets
for help on using tickets.
PR in https://github.com/postgis/postgis/pull/358 @Komzpa thanks a lot for the comments.
After the changes, on the very best case (polygons with low amount of vertices that are removed by this shortcut), postgis code only amounts to ~6.75% of the time, or 14.45% if we count its children. Any further improvement for this case will need to come from the Postgres side (or something like #4264).