<div>Thanks Dan,</div>
<div> </div>
<div>The BigPerformanceTest resulted in the following results:</div>
<div>(For each class I test for null and get the attribute)</div>
<div> </div>
<div>BigPerformanceTests.select (10/04/07 20:18:52):<br>880 features from class Symbolen in 0.047 seconds<br>4302 features from class Bebouwing in 0.219 seconds<br>390 features from class TopoLijnen in 0.016 seconds<br>3276 features from class InfraLand in
0.171 seconds<br>620 features from class Terreinen in 0.032 seconds<br>712 features from class InfraWater in 0.031 seconds<br>1867 features from class StraatHuis in 0.094 seconds<br>22 features from class OverigeNamen in
0.000 seconds<br>4.375 seconds</div>
<div><br>This looks really good. The 4.375 seconds include fetching the schema (the time spend here is no problem)<br> </div>
<div>I will try to get other UnitTest's to run as well.</div>
<div>// Piet</div>
<div> </div>
<div> </div>
<div><span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">Dan Stoica</b> <<a href="mailto:dan.stoica@autodesk.com">dan.stoica@autodesk.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><b><span style="COLOR: #1f497d">"What else can I do to trace performance or to make GetData faster?"</span></b></p>
<p><span style="COLOR: #1f497d"> </span></p>
<p><span style="COLOR: #1f497d">Do you have a profiling tool to run against a simple FDO test? If not, use some timers and narrow down the bottleneck. E.g.</span></p>
<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d"><span>-<span> </span></span></span>How long takes SpatialExtents(), Count()</p>
<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d"><span>-<span> </span></span></span>How long takes IsNull()</p>
<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d"><span>-<span> </span></span></span>How long takes GetGeometry()</p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Dan.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<div>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org
</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Badreddine Karoui<br><b>Sent:
</b> Thursday, October 04, 2007 9:20 AM<span class="q"><br><b>To:</b> FDO Users Mail List<br></span>
<div><span class="e" id="q_1156b4e58b0d2b34_2"><b>Subject:</b> RE: [fdo-users] Improving performance for NEN1878 provider, howto?</span></div></span>
<p></p></p></div></div>
<div><span class="e" id="q_1156b4e58b0d2b34_4">
<p> </p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Try replace the SHP provider dll in the providers xml file with you provider's dll and see if that makes a difference. Keep the provider name as is. Now, Map will think your provider is the SHP provider and you will need to provide the connection parameters through the SHP connect dialog or just hard code them in your connection object.
</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Badreddine</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org
</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Piet Bibber<br><b>Sent:</b>
Thursday, October 04, 2007 6:17 AM<br><b>To:</b> FDO Users Mail List<br><b>Subject:</b> Re: [fdo-users] Improving performance for NEN1878 provider, howto?</span></p></div>
<p> </p>
<div>
<p><span style="COLOR: black">Dan,</span></p></div>
<div>
<p> </p></div>
<div>
<p><span style="COLOR: black">SelectAggregates does instanciate the </span><span style="COLOR: #1f497d">OptimizedAggregateReader (at the bottom of the Execute command).</span></p></div>
<div>
<p> </p></div>
<div>
<p><span style="COLOR: #1f497d">Where I believe it is very slow is in getting data (through the IsNull and GetData methods); </span></p></div>
<div>
<p><span style="COLOR: #1f497d">The dialog with "Polulating Feature Cache" is on screen during 3 to 5 seconds; the same dataset in sdf takes sub seconds to load. The " Polulating Feature Cache" dialog doesn't even appear.
</span></p></div>
<div>
<p><span style="COLOR: #1f497d">My features are all in memory, no disk access is needed, yet is multiple times slower.</span></p></div>
<div>
<p> </p></div>
<div>
<p><span style="COLOR: #1f497d">i must be doing something wrong.</span></p></div>
<div>
<p> </p></div>
<div>
<p><span style="COLOR: #1f497d">When I return true to IsNull (and avoid the GetData call), its still slow....</span></p></div>
<div>
<p> </p></div>
<div>
<p><span style="COLOR: #1f497d">What else can I do to trace performance or to make GetData faster?</span></p></div>
<div>
<p> </p></div>
<div>
<p><span style="COLOR: #1f497d">Thanks for the help so far</span></p></div>
<div>
<p><span style="COLOR: #1f497d">Piet</span></p></div>
<div>
<p><span style="COLOR: black"> </span></p></div>
<div>
<p><br> </p></div>
<div>
<p><span>On 10/1/07, <b>Dan Stoica</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:dan.stoica@autodesk.com" target="_blank">dan.stoica@autodesk.com</a>> wrote:</span> </p>
<div>
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Indeed, </span><span style="COLOR: #1f497d">OptimizedAggregateReader is the place. Make sure your SelectAggregates command is instantiating such a reader.</span></p>
<p><span style="COLOR: #1f497d"> </span></p>
<p><span style="COLOR: #1f497d">Dan.</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org
</a>[mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Piet Bibber<span> </span><br>
<span><b>Sent:</b> Monday, October 01, 2007 10:16 AM</span><br><span><b>To:</b> FDO Users Mail List</span><br><b>Subject:</b> Re: [fdo-users] Improving performance for NEN1878 provider, howto?</span></p></div>
<div>
<p> </p>
<div>
<p>Robert, Badreddine, Gavin</p></div>
<div>
<p> </p></div>
<div>
<p>I do provide the extends and counts in <span style="FONT-SIZE: 10pt">Nen1878OptimizedAggregateReader. Is that what you refer to?</span></p></div>
<p>Piet</p>
<div>
<p><br><br> </p></div>
<div>
<p>On 10/1/07, <b>Robert Fortin</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:robert.fortin@autodesk.com" target="_blank">robert.fortin@autodesk.com</a>> wrote: </p>
<p>Badreddine,<br><br>Isn't it the combination of count and spatialExtents that need to be<br>optimized?<br>I believe Map looks for the equivalent of<br><br>Select SpatialExtents(geometry), count(*) from <class>
<br><br>RF<br><br><br>-----Original Message-----<br>From: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org </a><br>
[mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>] On Behalf Of Badreddine<br>Karoui<br>Sent: Monday, October 01, 2007 9:42 AM
<br>To: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org</a><br>Subject: RE: [fdo-users] Improving performance for NEN1878 provider,
<br>howto?<br><br>Hi,<br><br>You may want to implement the FdoISelectAggregates command plus the<br>SpatialExtents and Count functions. If these two functions are not <br>implemented, then Map will scan all the geometries to find the minimum
<br>bounding rectangle of all the data.<br><br>Badreddine<br><br>-----Original Message-----<br>From: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">
fdo-users-bounces@lists.osgeo.org</a><br>[mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>] On Behalf Of Piet Bibber
<br>Sent: Monday, October 01, 2007 7:46 AM<br>To: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org</a><br>Subject: [fdo-users] Improving performance for NEN1878 provider, howto?
<br><br><br>Hello,<br><br>My NEN1878 provider is almost done, but performance is not so fantastic<br>when<br>reading the geometry; reading the schema is alright. <br>That is stange, as I cache in the geometry when I read the schema
<br>(NEN1878<br>schema discovery requires a full file scan; no seperate schema header).<br>(The<br>schema is read within 3 seconds for a 2.3MB file, including the geometry <br>and<br>attributes (all in memory (using STL)).
<br>The SDF and SHP all seem so fast :-)<br><br>Map 3D seem to spend most of his time caching in the geometry (see<br>source<br>code below)<br><br>I based my provider on the SHP provider, the reader seem to use <br>FDO_READER
<br>template, but I can't find where that points to. Maybe there are better<br>optimized readers.<br><br>Thanks.<br>Piet<br><br>Excerpt from the source files:<br><br> FdoByteArray * CreateCachedGeometry(FdoByteArray* fgfByteArray_I)
<br> {<br> FdoByteArray* fgfByteArray = fgfByteArray_I; // it may be<br>reallocated<br> int count = mFeature->GetNumPoints();<br> FdoInt32 numPointOrds = 2;<br> FdoInt32 numBytesForOrdinates = numPointOrds *
<br>sizeof(double)<br>* count;<br> FdoInt32 numParts = 0;<br> FdoGeometryType fdoGeomType = GetFdoGeometryType();<br> FdoInt32 dimensionality = FdoDimensionality_XY;<br> FdoInt32 numPositions = mFeature->GetNumPoints();
<br><br> fgfByteArray->Clear();<br><br> fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(fdoGeomType), (FdoByte *) &fdoGeomType);<br><br> switch (fdoGeomType)<br> {<br> case FdoGeometryType_None:
<br> break;<br><br> case FdoGeometryType_Point:<br> fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(dimensionality), (FdoByte*)&dimensionality);<br> fgfByteArray = FdoByteArray::Append(fgfByteArray,
<br>numBytesForOrdinates, (FdoByte*)mFeature->GetPoints());<br> break;<br><br> case FdoGeometryType_LineString:<br> fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(dimensionality), (FdoByte *) &dimensionality);
<br> fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>sizeof(count),<br>(FdoByte *)&count);<br> fgfByteArray = FdoByteArray::Append(fgfByteArray,<br>numBytesForOrdinates, (FdoByte *)mFeature->GetPoints());
<br> break;<br><br> default:<br> throw<br>FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_10_UNSUPP<br>ORTEDGEOMETRYTYPE)));<br> }<br><br> return (fgfByteArray);
<br> }<br><br><br>// Returns pointer to vector of DoublePoints<br>inline DoublePoint* Nen1878Feature::GetPoints()<br>{<br> return (&mCoordinates[0]);<br>}<br><br>--<br>View this message in context:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.nabble.com/Improving-performance-for-NEN1878-provider%2C-howt" target="_blank">
http://www.nabble.com/Improving-performance-for-NEN1878-provider%2C-howt</a><br>o--tf4547817s18162.html#a12977669<br>Sent from the fdo-users mailing list archive at <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://nabble.com/" target="_blank">
Nabble.com</a>.<br><br>_______________________________________________ <br>fdo-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br><br>_______________________________________________
<br>fdo-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">
http://lists.osgeo.org/mailman/listinfo/fdo-users </a><br><br>_______________________________________________<br>fdo-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org" target="_blank">
fdo-users@lists.osgeo.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a></p>
</div>
<p> </p></div></div></div>
<p style="MARGIN-BOTTOM: 12pt"><br>_______________________________________________<br>fdo-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org" target="_blank">
fdo-users@lists.osgeo.org </a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a></p>
</div>
<p> </p></span></div></div></div><br>_______________________________________________<br>fdo-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br><br></blockquote></div><br>