[geos-devel] JTS/GEOS performance - smart-ptr vs ref counting

strk at refractions.net strk at refractions.net
Tue Feb 1 08:58:38 EST 2005

On Mon, Jan 31, 2005 at 06:08:30PM -0700, Chapman, Martin wrote:
> -- Has anyone profiled the code recently,  without profiling statistics
> optimization discussions are really just guesswork.
> I certainly agree with that statement.

I've added a profiler class to GEOS some time ago now.
If you define PROFILE to 1 in src/headers/geos/profiler.h
you get some profiling (where it is handled).

This is the profiling output for Buffer operation:

 num:3 min:6049 max:10308 avg:8558 tot:25674 [AbstractSTRtree::build]
 num:4413 min:9 max:8419 avg:18.5488 tot:81856 [AbstractSTRtree::query(searchBou
 num:1 min:349964 max:349964 avg:349964 tot:349964 [BufferBuilder::computeNodedE
 num:1 min:34981 max:34981 avg:34981 tot:34981 [BufferBuilder::computeNodedEdges
: labeling]
 num:1 min:520560 max:520560 avg:520560 tot:520560 [BufferOp::bufferOriginalPrec
 num:700 min:10 max:821 avg:28.9743 tot:20282 [EdgeList::findEqualEdge()]
 num:700 min:5 max:785 avg:15.6757 tot:10973 [EdgeList::findEqualEdge(Edge *e)]
 num:3 min:62170 max:127389 avg:104003 tot:312009 [IteratedNoder::node]
 num:11 min:0 max:4 avg:1.09091 tot:12 [LineSegment::LineSegment(void)]
 num:7257 min:0 max:28 avg:0.342566 tot:2486 [LineSegment::setCoordinates(const
Coordinate&, const Coordinate &)]
 num:9230 min:2 max:1873 avg:12.2067 tot:112668 [MCQuadtreeNoder::intersectChain
s computeOverlap]
 num:4413 min:11 max:10358 avg:26.1842 tot:115551 [MCQuadtreeNoder::intersectCha
ins query]
 num:11812 min:1 max:656 avg:2.12809 tot:25137 [SegmentNodeList::add(Coordinate
*, int, double)]

Test result=true Test time:531252

Most of the time is spent in the IteratedNoder (about 1/2).

I'll do more splitting of the IteratedNoder work.


More information about the geos-devel mailing list