[Cartoweb-dev] Hilight plugin performances

zze-SIGALE PORTANERI F ext RD-BIZZ-SOP fportaneri.ext at rd.francetelecom.com
Fri Dec 9 08:34:02 EST 2005


Humm... , seemed never delivered to cartoweb user list... may be I have
to repost it to dev list (??)


> Hi all,
> 
> I got some performance issues while using cartoweb with the hilight
> plugin activated and some large query selection :
> Under my config, with 400 points selected, the map refresh was about
> 50 seconds ( 500 points selected generate even a soap timeout at 60s).
> 
> Apparently, the time is mainly spend in mapserver while displaying the
> dedicated "XXX_hilight" layer, since if I set 'drawQueryUsingHilight =
> false' in query.ini to disable the hilight, the same page refresh is
> about 10s only. 
> After some investigations, I found that CartoWeb forces dynamically a
> new EXPRESSION in the first class of the hilight layer, in the form : 
> 
> EXPRESSION ( [idfield]="value1" OR [idfield]="value2" OR
> [idfield]="value3" OR ...OR [idfield]="value400" ) 
> 
> and I guess that mapserver got stuck to interpret this for wide list
> of values...
> 
> I don't know if this can help or not, but I found a way to speed up
> this process by moving this expression from the EXPRESSION field of
> the class to the DATA field of the layer: I modified the hilight
> plugin to dynamically write a new data string in the form:
> 
> $new_string = "geom from (SELECT * from my_schema.table WHERE
> idfield="value1" OR idfield="value2" OR idfield="value3" OR ...OR
> idfield="value400" ) AS foo USING UNIQUE idfield USING srid=-1" 
> $msLayer->set("data", $new_string);
> 
> This is definitively faster and the draw time result is about the same
> as for the default mapserver hilite mode (i.e. 10s in my case).
> Using this, cartoweb displays about 5200 hilighted points in 50s.
> 
> Now I am not sure this can be implemented in CartoWeb itself to
> improve hilight plugin performance, since it may be less generic that
> the current solution (if DATA fields of the layer to hilight are
> already complex for instance) but it can be implemented as an
> additional alternative if the user set a specific tag in his hilight
> layer data field to be replaced dynamicaly by the expression.
> 
> Regards,
> Franck
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-dev/attachments/20051209/7b59c5cd/attachment.html


More information about the Cartoweb-dev mailing list