[mapserver-users] PHP/MapScript applySLD() bottleneck
Sergio Segala
sergio.segala.list at gmail.com
Mon Jan 16 05:47:56 PST 2017
Hi all,
we are using PHP/MapScript 6.4.4 and have a bottleneck on the
$map->applySLD() call, when the SLD is quite big (5440 lines / 72
NamedLayer occurrence).
On my VM the $map->applySLD() call time is about 3.5 sec per request,
and I think the problem is inside mapserver. The computation time is
linear with the number of NamedLayer node in the XML: less NamedLayer
node in the SLD, faster is the map.
I tried also to parse the XML with the php simplexml_load_string, but
there is no bottleneck in this case (always fast)
I also notice that mapserver send a lot of query to the database and
probably this this the cause or the contributory cause of the speed issue
Is there a way to improve performance and maybe to reduce the db requests?
We need to use the SLD to restyle the map runtime to apply some
customization depends on the web request.
Thanks in advance
Sergio
More information about the MapServer-users
mailing list