<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello everyone,<br>
<br>
Here's my problem: I'm trying to highlight segments from a line layer
by using an expression in a specific class. This portion of the mapfile
is dynamically generated and when it is done, it is sent to mapserver
for rendering. <br>
My problem is that I have to select between 10 - 400 features at a time
and I noticed when I have a lot of features there is a severe
performance degradation in mapserver (takes a lot of time to render or
even times out).<br>
Right now, my expression is built using regular expressions: something
like:<br>
<b>EXPRESSION /^ITEM1$|^ITEM2$|^ITEM3$|^ITEM4$/</b><br>
This works ok, but as I said has a performance penalty when you reach
~400 items.  My data is selected from a shapefile layer which has about
5500 items.<br>
<br>
Since I wouldn't be using the regular expressions at full capacity (I'm
matching the full name), I might rewrite the expression using something
like:<br>
<b>EXPRESSION ( ([NAME]=="ITEM1") OR ([NAME]=="ITEM2") OR
([NAME]=="ITEM3") OR ([NAME]=="ITEM4") )</b><br>
<br>
From the documentation I see that:<br>
<i>Regular expression with MapServer work similarly to string
comparison, but
allow more complex operation. They are slower than pure string
comparisons,
but might be still faster than logical expression. As with the string
comparison use regular expressions, a FILTERITEM or a CLASSITEM has to
defined, respectively.<br>
<br>
</i>I would like to know if there is an efficient way of selecting a
list of elements from a layer, or what are your recommendations.<br>
<br>
Also - have there been significant changes in performance for this
issue from mapserver 4.10 (I am now migrating to mapserver 5.4)?<br>
<br>
Thanks,<br>
Adrian<br>
<br>
</body>
</html>