<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 April 2013 19:21, Daniel Morissette <span dir="ltr"><<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you!<br>
<br>
BTW, will string delimiters be honoured inside the list expression? e.g.<div class="im"><br>
<br>
LAYER<br>
...<br>
CLASSITEM "type"<br>
CLASS<br></div>
EXPRESSION {"a","b","a,b","4,500"}<br>
...<br>
END<br>
END</blockquote><div style>No they will not be supported, the expression evaluator is very fast but rudimentary (the provided list isn't split up into a char* array, we just strchr() look for commas, and strncmp with the attribute value). If the need arises this could be added in a second phase, although I'm not sure how that would be handled by the lexer yet.</div>
<div style>I'll add a note about this in the RFC.</div><div style><br></div><div style>thanks,</div><div style>thomas </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
<br>
<br>
On 13-04-04 12:39 PM, thomas bonfort wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Daniel,<br>
<br>
done:<br>
<a href="https://github.com/mapserver/docs/blob/branch-6-2/en/development/rfc/ms-rfc-95.txt" target="_blank">https://github.com/mapserver/<u></u>docs/blob/branch-6-2/en/<u></u>development/rfc/ms-rfc-95.txt</a><br>
(will appear on the website shortly)<br>
<br>
I don't think it's worth calling for a new vote on the actual RFC, this<br>
email thread should suffice.<br>
<br>
regards,<br>
thomas<br>
<br>
<br>
<br>
On 4 April 2013 16:18, Daniel Morissette <<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a><br></div><div><div class="h5">
<mailto:<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.<u></u>com</a>>> wrote:<br>
<br>
+1 on the addition.<br>
<br>
Bonus points if we could get a simple RFC to document and keep a<br>
trace of the addition. The contents of this email with a tiny bit of<br>
editing might be enough, it's just that having it in a RFC would be<br>
easier than looking for it in a ticket or the list archives, and<br>
would allow us to refer to this RFC as a one of the new features at<br>
release time.<br>
<br>
My 0.02$<br>
<br>
Daniel<br>
<br>
<br>
<br>
On 13-04-03 11:16 AM, thomas bonfort wrote:<br>
<br>
While profiling the openstreetmap renderings, I found a<br>
relatively low<br>
hanging performance speedup related to expressions when doing class<br>
filtering. The context relates to when you'd need to apply a<br>
given CLASS<br>
to multiple attribute values.<br>
Currently, to apply a single class to multiple values of an<br>
attribute,<br>
you can either use regular expressions, or use the IN operator,<br>
like this:<br>
<br>
LAYER<br>
...<br>
CLASSITEM "type"<br>
CLASS<br>
EXPRESSION /primary|secondary|tertiary/ #regular<br>
expression on<br>
CLASSITEM<br>
EXPRESSION ("[type]" IN "primary,secondary,tertiary")<br>
#"complex"<br>
parser expression<br>
...<br>
END<br>
END<br>
<br>
Both methods require quite a bit of overhead, either in the<br>
regex system<br>
calls, or by using quite a few mallocs when going through the IN<br>
parser<br>
operation.<br>
<br>
We can cut down on this overhead by adding a "list" expression type,<br>
denoted by the { } delimiters, where the previous layer<br>
definition becomes:<br>
<br>
LAYER<br>
...<br>
CLASSITEM "type"<br>
CLASS<br>
EXPRESSION {primary,secondary,tertiary}<br>
...<br>
END<br>
END<br>
<br>
The modifications to the code are fairly straightforward, and no<br>
backwards incompatibilities are expected as this is a new<br>
functionality<br>
that does not collide with previous mapserver expressions.<br>
The changes can be seen here:<br></div></div>
<a href="https://github.com/tbonfort/__mapserver/commit/__fae435d17b099485ab6792bfae3a7d__8dd8992b4c" target="_blank">https://github.com/tbonfort/__<u></u>mapserver/commit/__<u></u>fae435d17b099485ab6792bfae3a7d<u></u>__8dd8992b4c</a><div class="im">
<br>
<<a href="https://github.com/tbonfort/mapserver/commit/fae435d17b099485ab6792bfae3a7d8dd8992b4c" target="_blank">https://github.com/tbonfort/<u></u>mapserver/commit/<u></u>fae435d17b099485ab6792bfae3a7d<u></u>8dd8992b4c</a>><br>
. (you can ignore the changes to mapparser.*, they correct a bug<br>
in the<br>
IN parser and aren't related to the list operator)<br>
<br>
Our parser guru is OK with these changes, so I would like to vote to<br>
include this new expression for our 6.4 release.<br>
<br>
I'll start with my +1<br>
<br>
best regards,<br>
thomas<br>
<br>
<br></div>
______________________________<u></u>___________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a> <mailto:<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.<u></u>osgeo.org</a>><br>
<a href="http://lists.osgeo.org/__mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/__<u></u>mailman/listinfo/mapserver-dev</a><div class="im"><br>
<<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><u></u>><br>
<br>
<br>
<br>
--<br>
Daniel Morissette<br>
<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
Provider of Professional MapServer Support since 2000<br>
<br>
<br></div>
______________________________<u></u>___________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a> <mailto:<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.<u></u>osgeo.org</a>><br>
<a href="http://lists.osgeo.org/__mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/__<u></u>mailman/listinfo/mapserver-dev</a><br>
<<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><u></u>><div class="im"><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
-- <br>
Daniel Morissette<br>
<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
Provider of Professional MapServer Support since 2000<br>
<br>
______________________________<u></u>_________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><br>
</div></div></blockquote></div><br></div></div>