Chris

the way the highlight works, is taking all shape features' ID's and 
adding one by one to a temporary dynamic layer, using a Mapscript 
function addFeature(). This is for sure not an efficient way but has no 
problems for "normal" selections up to a few 100's. Having a result 
table displayed for 5000 records will also not be very fast, though.

There's a new approach used for Postgis layers since the old method (the 
one used for shapefiles) did not work any more with Mapserver 5.6. This 
should in theory be somewhat faster because the highlight is done by a 
clone of the queried layer using the SQL "IS IN (...)" clause. This will 
also very likely not be blazingly fast for huge amount of data but 
should work better than the old method. You need to set an index for the 
field used for the UNIQUE in the CONNECTION tag. You need an SVN 
checkout newer than a few weeks to have this included.

One could very likely speed it up using the same query applied to the 
Postgis layer that is sent to the DB by Mapserver as an effect of the 
queryByRectangle(), but I don't have a clue how one can get this query 
string.

Let me know if it helps, at least a bit...

Armin


On 24/08/2010 16:58, Chris Jackson wrote:
> Hi all
>
> One of the underlying datasets in my P.Mapper app is a model grid (many
> thousand cells) in a shapefile.  The data displays nice and quick when just
> viewing, but if I allow the user to select say 5000 cells (using the select
> by rectangle tool or even the seach tool) it is very (extremely) slow to
> redraw with the highlighted cells.  Doing the same task in a very old ArcGIS
> server web app was much quicker (admittedly the data was in SDE/MS SQL).  So
> my question is what is the best way to improve performance?  Does using a
> shapefile just not cut it when selecting so much data?  Has anyone got
> P.Mapper to work with a mapfile containing a layer where the data is within
> a MS SQL 2005 db with the MSSQLSPATIAL add-on (using OGR)?   Or are there
> other better approaches to use or settings (inc. PHP) to tweak?
>
> Many thanks
> Chris
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>


------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to