<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.gmailquote
        {mso-style-name:gmail_quote;}
span.q
        {mso-style-name:q;}
span.e
        {mso-style-name:e;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Badreddine<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
fdo-users-bounces@lists.osgeo.org [mailto:fdo-users-bounces@lists.osgeo.org] <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?<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal><span style='color:black'>Dan,</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:black'>SelectAggregates does instanciate
the </span><span style='color:#1F497D'>OptimizedAggregateReader (at the
bottom of the Execute command).</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>Where I believe it is very slow
is in getting data (through the IsNull and GetData methods); </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><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><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>My features are all in memory,
no disk access is needed, yet is multiple times slower.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>i must be doing something wrong.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>When I return true to IsNull
(and avoid the GetData call), its still slow....</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>What else can I do to trace
performance or to make GetData faster?</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>Thanks for the help so far</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:#1F497D'>Piet</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='color:black'> </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><br>
<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=gmailquote>On 10/1/07, <b>Dan Stoica</b> <<a
href="mailto:dan.stoica@autodesk.com">dan.stoica@autodesk.com</a>> wrote:</span>
<o:p></o:p></p>
<div>
<div>
<p><span style='font-size:11.0pt;color:#1F497D'>Indeed, </span><span
style='color:#1F497D'>OptimizedAggregateReader is the place. Make sure your
SelectAggregates command is instantiating such a reader.</span><o:p></o:p></p>
<p><span style='color:#1F497D'> </span><o:p></o:p></p>
<p><span style='color:#1F497D'>Dan.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> <a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org
</a>[mailto:<a 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 class=q> </span><br>
<span class=q><b>Sent:</b> Monday, October 01, 2007 10:16 AM</span><br>
<span class=q><b>To:</b> FDO Users Mail List</span><br>
<b>Subject:</b> Re: [fdo-users] Improving performance for NEN1878 provider,
howto?</span><o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
<div>
<p>Robert, Badreddine, Gavin<o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p>I do provide the extends and counts in <span style='font-size:10.0pt'>Nen1878OptimizedAggregateReader.
Is that what you refer to?</span><o:p></o:p></p>
</div>
<p>Piet<o:p></o:p></p>
<div>
<p><br>
<br>
<o:p></o:p></p>
</div>
<div>
<p>On 10/1/07, <b>Robert Fortin</b> <<a
href="mailto:robert.fortin@autodesk.com" target="_blank">robert.fortin@autodesk.com</a>>
wrote: <o:p></o:p></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 href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org
</a><br>
[mailto:<a 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 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 href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a><br>
[mailto:<a 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 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
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 href="http://nabble.com/"
target="_blank">Nabble.com</a>.<br>
<br>
_______________________________________________ <br>
fdo-users mailing list<br>
<a href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org
</a><br>
<a 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 href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org</a><br>
<a 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 href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><o:p></o:p></p>
</div>
<p> <o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
fdo-users mailing list<br>
<a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org </a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>