Opened 4 years ago

Closed 4 years ago

#4615 closed enhancement (fixed)

Optimize lwout_geojson output

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

Description

Related to ​https://trac.osgeo.org/postgis/ticket/4543

After #4543 is applied, around half the time spent in the output of ST_AsGeoJSON of a big polygon (>100k vertices) is spent in sprintf calls, mainly calculating the length of the strings (which we already know). It should be possible to remove all this time by replacing it a memcpy calls or writting the doubles directly in the buffer (instead of writting them in an auxiliar variable and then into the buffer).

Change History (1)

comment:1 by Raúl Marín <git@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 892fcde0/git:

Geojson: Print doubles directly on the output buffer

Closes #4615
Closes https://github.com/postgis/postgis/pull/537

Note: See TracTickets for help on using tickets.