MapTools.org

[Chameleon] mousemove and CPU

Bart van den Eijnden bartvde@xs4all.nl
Sun, 11 Jan 2004 21:02:31 +0100
Hi Paul,

I have the feeling this is especially the case when the ROI tool is in the 
application. I have 2 applications, one with the ROI Rectangle tool, and 
one without. And for the application with the ROI tool, the mouse movement 
is really slower/taking more CPU than in the application without the ROI 
tool.

Also when doing some profiling with Venkman in Mozilla (great tool BTW) 
the ROI mousemove functions are among the most heavy ones.

     Function Name: ROIRectToolGetMousePosition  (Lines 1148 - 1188)
     Total Calls: 114 (max recurse 0)
     Total Time: 761.09 (min/max/avg 10.01/10.02/6.68)


     Function Name: ROIRectToolMouseMove  (Lines 1190 - 1211)
     Total Calls: 114 (max recurse 0)
     Total Time: 761.09 (min/max/avg 10.01/10.02/6.68)

Best regards,
Bart

On Thu, 08 Jan 2004 16:31:21 -0500, Paul Spencer <pagameba@magma.ca> wrote:

> Bart,
>
> we are (hopefully) going to be looking into this issue with JF Doyon and 
> NRCan.  The current mechanism is to attach to the onmousemove event 
> handler of the document object.  We are proposing to replace this with 
> an event handler on the map image (or layer or whatever works in most 
> DOMs) with backwards compatibility to use the existing mechanism.  This 
> requires some rework since all the move movement handling is done in 
> slightly different ways and I would like to consolidate this into one 
> centralized handling function.
>
> As to why it happens over the document and not the map image, I have no 
> clue!  Any hints on this would be great.
>
> Cheers,
>
> Paul
>
> Bart van den Eijnden wrote:
>
>> Hi list,
>>
>> I have been looking a little bit into the CPU usage of a Chameleon 
>> application and see that the things that occur on the mouse move event 
>> take a lot of CPU (50-100% depending on the speed of movement). Perhaps 
>> some of these functions could be on intervals which are more friendly 
>> to the CPU usage?
>>
>> Also, I noticed that this does not only occur when moving over the map 
>> area, but this occurs when moving over any part of the page. That's 
>> quite strange, because no coordinates etc. need to be updated when 
>> moving the mouse around outside the map area.
>>
>> Best regards,
>> Bart _______________________________________________
>> Chameleon mailing list
>> Chameleon@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>



-- 
  


This archive was generated by Pipermail.