[postgis-tickets] [PostGIS] #4775: [3.1] Performance regression on gserialized_overlaps_2d

PostGIS trac at osgeo.org
Fri Oct 23 07:59:46 PDT 2020


#4775: [3.1] Performance regression on gserialized_overlaps_2d
-------------------------+---------------------------
  Reporter:  Algunenano  |      Owner:  Algunenano
      Type:  defect      |     Status:  assigned
  Priority:  medium      |  Milestone:  PostGIS 3.1.0
 Component:  postgis     |    Version:  master
Resolution:              |   Keywords:
-------------------------+---------------------------

Comment (by Algunenano):

 I've discovered 2 issues:

 - I changed gserialized_datum_predicate_2d to use use GBOX, so it does a
 double conversion: it gets the float box, creates a gbox using doubles and
 then downcasts it to float again.

 - PG_DETOAST_DATUM_SLICE always returns a copy of the datum even if it
 doesn't need to do anything with it (external, indirect, expanded,
 compressed), so for small geometries (untoasted) we are doing an extra
 copy and free that we didn't do before. I'm thinking on a more addecuate
 function for this case where we don't do anything to the datum if we don't
 need to, and only get a slice if we do because of how it was stored.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4775#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list