[geos-devel] LineSegment copy removal, ABI protection 2

strk at refractions.net strk at refractions.net
Mon Jun 27 14:41:23 EDT 2005


I've found that many of the Coordinate copies are
done within LineSegment. LineSegment contains two
points and ops on them.

Fiddling with SubgraphDepthLocater I've handled
to reduce run time of the attached test from
279.71 to 17.17 seconds !

I obtained this avoiding to construct a LineSegment
until really needed.

  %   cumulative   self              self     total                              time   seconds   seconds    calls   s/call   s/call  name                       84.82    237.26   237.26  7645820     0.00     0.00  geos::LineSegment::reverse()
 
Martin, should LineSegment store REAL coordinates or can it
safely store references to them ?

... this change would break both ABI and API, probably unused parts
but still ... maybe we should add a new class like LightLineSegment
to avoid it in this case.

--strk;



More information about the geos-devel mailing list