[geos-devel] Ability to preallocate the WKT stringstream buffer for really large geometries?
mats.taraldsvik at norkart.no
Thu Feb 7 23:22:21 PST 2013
Have you considered this issue? Do you accept patches to solve this by changing the interface (considering GEOS is a port of JTS and follows it closely)? :)
> -----Opprinnelig melding-----
> Fra: geos-devel-bounces at lists.osgeo.org [mailto:geos-devel-
> bounces at lists.osgeo.org] På vegne av Mats Taraldsvik
> Sendt: 18. januar 2013 12:53
> Til: geos-devel at lists.osgeo.org
> Emne: [geos-devel] Ability to preallocate the WKT stringstream buffer for
> really large geometries?
> Generally, I'm very satisfied with the WKTWriter, which is really easy to use,
> and converts the Geometries to the WKT format. However, when converting
> _large_ geometries (in this case, contour lines), I get a major decrease in
> By looking at the source code (and profiling), I believe the use of a
> stringstream and hence a dynamically increasing string buffer, constantly
> reallocating, is causing the performance penalty. Possibly also copying the
> large string.
> Is there anything I can do to improve this scenario? Do you accept
> contributions to fix this (e.g. passing in the expected size of the resulting
> WKT string)?
> Mats Taraldsvik
> mats.taraldsvik at norkart.no
> Løkketangen 20A
> Postboks 145
> N- 1300 Sandvika
> +47 67 55 14 00
> geos-devel mailing list
> geos-devel at lists.osgeo.org
More information about the geos-devel