[mapguide-users] MrSID files through GDAL FDO provider

Martin Morrison martin.morrison at edsi.com
Thu Jun 14 13:24:04 EDT 2007


When I asked this question it was NOT to pick on anybody or any one item
in the code.  Something that is fast can be made faster.  I was simply
asking a question in regards to optimization.  It was not a problem that
I found.  

My background is with GIS administration ( specifically GE Smallworld
and others ).   The territory the GIS covered was parts of 11 states
with several million power poles (and the wire, devices and misc
attached).  If we could save a few milliseconds in a loop with no loss
of functionality, you can guarantee we saved that time.  It adds up.

If there are other opportunities for optimization, please let the list
know.  Larger gains in optimization would be more beneficial.  Perhaps a
FAQ with general statements with a link provided to more specific
details.

Martin

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Frank
Warmerdam
Sent: Thursday, June 14, 2007 1:03 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] MrSID files through GDAL FDO provider

Kenneth, GEOGRAF A/S wrote:
> The current problem is the Open() call, which tests the providers in
turn.
> If there was a file in the folder (say "GDAL Loader Hints.txt" stating
ea.:
> MrSID
> ECW

Kenneth,

You state that the "current problem is the Open() call, which tests the
providers in turn.".  What basis do you have to think this is a problem?

I would stress that this is the same mechanism GDAL has used for eight
years, and has been the basis of the raster rendering in MapServer which
is widely accepted as "fast".

For instance, this is the first code in ECWDataset::Open():

     if( EQUALN(poOpenInfo->pszFilename,"J2K_SUBFILE:",12) )
         return Open( poOpenInfo );

     else if( poOpenInfo->nHeaderBytes >= 16
         && (memcmp( poOpenInfo->pabyHeader, jpc_header,
                     sizeof(jpc_header) ) == 0
             || memcmp( poOpenInfo->pabyHeader, jp2_header,
                     sizeof(jp2_header) ) == 0) )
         return Open( poOpenInfo );

     else
         return NULL;

Basically, a string comparison, and then one or two comparisons of
a few bytes of the file header (pre-read and reused for each driver).
This is *fast*.  There are *real* opportunities for optimization out
there.  This is not one of them.

OK, rather than drag this out, I'm going to stop responding to this
thread.

Best regards,
-- 
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-users mailing list