Opened 13 years ago

Closed 3 years ago

#735 closed enhancement (fixed)

Improve performance on GetGeometry

Reported by: maland Owned by: gregboone
Priority: major Milestone: 3.6.0
Component: ArcSDE Provider Version: 3.5.0
Severity: 3 Keywords:
Cc: External ID:

Description

We have done some profiling of the GetGeometry function in the ArcSDE provider. The performance when reading large geometries is rather poor. In one of our datasets we have rather large MultiLineString geometries, eg. one geometry consisting of 35581 lines (71260 points). For this particular geometry, the GetGeometry function takes 4-5 seconds to execute! The profiling reveals where the vast majority of the time is spent:

83 % : SE_shape_get_num_points
 9 % : FdoArrayHelper

I have attached a profiling screenshot for reference.

The SDE API offers a SE_shape_as_WKB functions which runs in just 2-3 milliseconds. Could that be used in conjunction with a Wkb2Fgf? That would greatly improve speed for large multi-geometries.

Regards Henning Maland

Attachments (5)

GetGeometry.png (56.9 KB ) - added by maland 13 years ago.
GetGeometry profiling screenshot
sde_geomhandling.diff (56.1 KB ) - added by oyvndi 13 years ago.
ArcSDEGeometryBuffer.cpp (25.6 KB ) - added by oyvndi 13 years ago.
ArcSDEGeometryBuffer.h (1.6 KB ) - added by oyvndi 13 years ago.
Ticket735.patch (87.6 KB ) - added by gregboone 13 years ago.

Download all attachments as: .zip

Change History (9)

by maland, 13 years ago

Attachment: GetGeometry.png added

GetGeometry profiling screenshot

comment:1 by oyvndi, 13 years ago

The main perfomance killer turned out to be SDE's API, such as SE_shape_get_num_points().

I removed all the existing buffer handling, including code inside macros (which makes debugging impossible). Instead I added the DynamicBuffer-class, which is a simple class that handles allocation, using templates.

I also did related code cleanup, and the amount of code in total is now slightly reduced.

by oyvndi, 13 years ago

Attachment: sde_geomhandling.diff added

by oyvndi, 13 years ago

Attachment: ArcSDEGeometryBuffer.cpp added

by oyvndi, 13 years ago

Attachment: ArcSDEGeometryBuffer.h added

comment:2 by oyvndi, 13 years ago

(Attached new files that didn't svn diff doesn't include)

by gregboone, 13 years ago

Attachment: Ticket735.patch added

comment:3 by gregboone, 13 years ago

Status: newassigned

The current plan is to commit these changes into the Trunk. There is no current plan to backport these changes to 3.6.

comment:4 by jng, 3 years ago

Resolution: fixed
Status: assignedclosed

Fixed r6245

Note: See TracTickets for help on using tickets.