I did some multithreading tests of mapscript (C#/.NET 2.0). (We've discussed
before about safety and performance in mapscript.)
Purpose was to test performance when simultanouly running threads are making
actions on map object like pan, zoom, querybyattribute etc. Each thread at
start get own map object and then some those actions was did.
Threads was running on 4 processors machine.
-Intel Xeon E5320,
-MapScript ver:5.1-dev downloaded from
I used shapefiles stored on RAID (1GB of data).
Find out that there is no problem with statics variables which is used in
mapfile parsing. During parsing simultanously 200 threads, processors was
used in 98-100%. It is OK.
Guess that probably the there is a problem with draw method. It seems like
it is significant bottle neck. During tests, when threads was executing
methods like: zoomPoint, setExtent, queryByAttributes, drawLegend,
drawScalebar, and draw, processors was used in 25-35 % ONLY. So only one
processor was still used in 100%.
Anyone knows why it is happening? How to improve performance?
I guess that the reason is locks in draw process.