[RCD] Dragging Takes 100% CPU

Thomas Bruederli roundcube at gmail.com
Fri Oct 3 12:55:39 CEST 2008


On Wed, Oct 1, 2008 at 18:10, A. L. E. C <alec at alec.pl> wrote:
> On Wed, 01 Oct 2008 11:59:18 -0400, Ziba Scott <ziba at umich.edu> wrote:
>
>> 1763 removed that onmouseover event and instead calls drag_move every
>> time the mouse moves.  drag_move essentially polls the position of the
>> mouse and loops over every folder on screen to see if the mouse is above
>> that folder folder.  This polling is costly and has mixed effects across
>> browsers, operating systems and pcs with different specs.
>
> I must agree with you. It's slow and currenty (dragging) isn't working over
> preview panel's iframe. It must be fixed in some way, but it was Thomas'
> change, wait what he'll say.

The main reason to change this was Firefox which didn't fire the
mouseover and mouseup event when the user started dragging on an empty
part (no text below) of the message list. Mousemove events also got
lost on the iframe with the old solution.

The new polling solution worked nice (and with the same results) on
all the browsers I tested. Of course there's some potential for
improvements like using intervals to do the collision detection and
only set mouse coords in the event handler routine.

If you have suggestions to improve the dragging, don't hesitate to
post them here. For the 0.3 version we're planning to use jquery and
this will probably solve the issue anyway.

~Thomas
_______________________________________________
List info: http://lists.roundcube.net/dev/



More information about the Dev mailing list