Hi Jukka<br><br>Thanks for the response and the great investigative work!<br>My log entry for drawing the layer is - [Fri Sep 03 10:01:25 2010].658000 msDrawMap(): Layer 1 (meanspringpeakflow), 24.500s. :o(<br><br>I do wonder if my Mapfile layer definition is just v.poor (admittedly no expert!) so have taken an excerpt of the layer defintion (there are about 15 classes in all) - views anyone, should I be loading it a different way?<br>
<br>Also Jukka, could I get a sample of your <span style="color: rgb(51, 0, 51);"><font face="Arial" size="2">scale dependent WMS GROUP layer map code - as it sounds like a great idea maybe for this but also some v.hi-res model grids I am thinking about.</font></span><br>
<br>Thanks again, much appreciated!<br>Chris<br><br>LAYER<br> NAME "meanspringpeakflow"<br> TYPE polygon <br> DEBUG 5 <br> DATA "Tide"<br> TEMPLATE void<br> PROJECTION<br> "+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs" <br>
END<br> METADATA <br> "DESCRIPTION" "Mean Spring Peak Flow"<br> "RESULT_FIELDS" "ID,DISTANCE,DEPTH,MEAN_SP_PC"<br> "RESULT_HEADERS" "ID,Minimum Distance (m),Average Depth (m),Mean Spring Peak Flow (m/s)"<br>
"ows_title" "meanspringpeakflow"<br> "RESULT_HYPERLINK" "ID|| Load graphing tool"<br> END # Metadata <br> CLASS<br> NAME '> 4.00 (m/s) '<br>
EXPRESSION ([MEAN_SP_PC] >= 4 AND [MEAN_SP_PC] < 4.5) <br> STYLE<br> COLOR 135 99 64<br> END #end style<br> END # end class<br> CLASS<br> NAME '3.51 - 4.00'<br>
EXPRESSION ([MEAN_SP_PC] >= 3.5 AND [MEAN_SP_PC] < 4) <br> STYLE<br><br> COLOR 158 126 63<br> END #end style<br> END # end class<br>etc etc<br><br><br><div class="gmail_quote">
On 3 September 2010 09:04, Rahkonen Jukka <span dir="ltr"><<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>I took some numbers to compare
with.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Material and methods</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Polygon layer, rather simple polygons with few
vertises, Feature Count: 117383</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>DEBUG 5 in mapfile</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>WMS client asks for the whole layer</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span>Mapserver 5.2.1 (CGI) on not so fast Windows
computer</span></font><font color="#0000ff" face="Arial" size="2"></font><br></div>
<div><span><font color="#0000ff" face="Arial" size="2">Results</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2">First
request: rendering time taken from the log file are between 3.5 and 4.5
seconds</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2">Following request, BBOX is changing but all the polygons are drawn
though: rendering times 1.5 - 2.5 seconds</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">Conclusions and discussion</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2">At
first one might think that my server is faster. But this test is not
controlled at all because we are not using the same shapefiles and we can't say
so. What we can say that a couple of hundred of thousand polygons can
be drawn faster. </font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">However, it does not really make sense to render an image this way if it
should be fast. If the screen has 1000 by 1000 pixels it makes a million
pixels together. For 200000 polygons it makes 5 pixels per polygon.
You can simplify your polygon geometries pretty much before anybody can see
the differense. If the polygons are spread evenly nobody can even see
the difference if there are 20000 or 200000 polygons on the
screen.</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">We
have one polygon layer with about million polygons and for that I made
two simplified layers which contain only 1 percent and 10 percent of all
the polygons. Those and the original shapefile are put into the same
scale dependent WMS GROUP layer. This group is pretty fast at any
scale. The 1 percent layer is perhaps a bit too sparse but I have been too
lazy to have a try with 2 or 5 percent samples.</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">-Jukka
Rahkonen-</font></span></div>
</div></blockquote></div>