[postgis-tickets] [PostGIS] #3382: Avoid deserializing small geometries during index operations

PostGIS trac at osgeo.org
Sat Nov 28 17:22:48 PST 2015


#3382: Avoid deserializing small geometries during index operations
-------------------------+---------------------------
 Reporter:  dbaston      |      Owner:  pramsey
     Type:  enhancement  |     Status:  new
 Priority:  high         |  Milestone:  PostGIS 2.3.0
Component:  postgis      |    Version:  trunk
 Keywords:               |
-------------------------+---------------------------
 In doing some work on #75, I decided to profile some simple point-in-
 polygon queries using Callgrind.  I was surprised to see that much of the
 time was being taken by gserialized_gist_2d.c, around line 565.  Since
 points aren't carrying a box, this code path was doing a lot of work
 deserializing points to compute a using generic routines.

 However, a more efficient approach for these corner cases has already been
 implemented in the gserialized_peek_gbox_p function.  Replacing the
 current deserialization code with a call to gserialized_get_gbox_p allows
 gserialized_gist_2d to take advantage of the more efficient routines
 without adding any complexity.

 In my testing this is bringing about a 30-40% performance increase in
 point-in-polygon joins.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3382>
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