[postgis-tickets] [PostGIS] #4623: Optimize ST_AsBinary
PostGIS
trac at osgeo.org
Mon Jan 20 07:39:41 PST 2020
#4623: Optimize ST_AsBinary
-------------------------+---------------------------
Reporter: Algunenano | Owner: Algunenano
Type: enhancement | Status: assigned
Priority: medium | Milestone: PostGIS 3.1.0
Component: postgis | Version: master
Keywords: |
-------------------------+---------------------------
LWGEOM_asBinary calls `lwgeom_to_wkb` which does the task to serialize the
geometry in the WKB format and then, to be able to output it as a datum,
it needs to allocate another buffer and copy all the information there.
I think this could benefit from a small change in lwgeom_to_wkb to return
a Datum / varlena (or an equivalent liblwgeom type) directly. We already
have `SIZE_SET` and `SIZE_GET` for gserialized operations and they could
be reused here.
This would only make sense if there was a noticeable impact in
performance, which is what I intend to investigate in this issue.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4623>
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