The code is now fixed. As I got started, I also did some related code cleanup:<br><br>- the macro function EXPAND() are now gone. Instead, I made a simple templated<br>array class with an array subscript operator. This looks much cleaner now and can be <br>
debugged.<br><br><br>- the macro function ADD_POINT is also gone, replaced with an inline static function.<br><br><br>- memory leak: ArcSDEConnection, line 885: <br><br>CHAR *qualified_table_name = new CHAR[SE_QUALIFIED_TABLE_NAME+1];<br>
<br>This one never gets deleted. I can&#39;t see any reason to use new, so I replaced it<br>with an array instead:<br>   <br>CHAR qualified_table_name [SE_QUALIFIED_TABLE_NAME+1];<br><br><br><br>However, there are still things I&#39;d like to do with the code: The geometry buffering is <br>
attached to the ArcSDEConnection class, and functions like convert_sde_shape_to_fgf()<br>are poking around in these arrays (XY, Z, parts etc). What I would like to do, is to<br>wrap all these arrays together with the indexing code into a new SDE geometry <br>
handling class. This won&#39;t add anything new, just make it more clean.<br><br><br>Where can I submit/send the changes ?<br><br><br>-- Oyvind<br><br><br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 4:53 PM, Oyvind Idland <span dir="ltr">&lt;<a href="mailto:oyvind.idland@gmail.com">oyvind.idland@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>I have been looking into an issue that was brought up here earlier. Turns out that the SDE API<br>
is slower than cold molassis when using SE_shape_get_num_points() on multipart geometries.<br><br>I did some experimentation using the index tables returned from SE_shape_get_all_points()<br>
directly. The total processing speed on my dataset went from roughly 20 secs down to less than <br>1 sec. There are several huge polygons with 200+ holes in them, and multilines.<br><br>Why the native SDE API is so slow is a mystery, those indices should not require heavy<br>

calculation.<br><br>The code is experimental so far, but when I finish writing the code, I can submit a patch<br>if desired.<br><br><br>-- Øyvind Idland <br>
</blockquote></div><br>