Opened 5 months ago

Closed 4 months ago

#4503 closed enhancement (fixed)

Speed up the calculation of cartesian bbox

Reported by: Algunenano Owned by: pramsey
Priority: medium Milestone: PostGIS 3.0.0
Component: postgis Version: master
Keywords: Cc:

Description

After fixing several functions not updating the bbox of the output geometry (ST_RemoveRepeatedPoints, ST_Simplify and ST_SnapToGrid) those functions have received an important performance impact; to the point where they might spend more time calculating the bbox than doing the actual work; e.g.:

   - 97.47% ST_RemoveRepeatedPoints                                                                                                                                                                                                         ▒
      + 32.26% lwgeom_calculate_gbox_cartesian                                                                                                                                                                                              ▒
      + 23.72% lwgeom_remove_repeated_points_in_place                                                                                                                                                                                       ▒
      + 22.67% heap_tuple_untoast_attr                                                                                                                                                                                                      ▒
      + 16.47% gserialized2_from_lwgeom                                                                                                                                                                                                     ▒
      + 2.31% lwgeom_from_gserialized2

I've made some improvements to the lwgeom_calculate_gbox_cartesian function to improve it's performance.

PR in https://github.com/postgis/postgis/pull/475

Change History (1)

comment:1 Changed 4 months ago by Algunenano

Resolution: fixed
Status: newclosed

Pushed in r17808

Note: See TracTickets for help on using tickets.