Observing mouseover will only help on page load - but it will not improve the draggable performance cause the problem is (as far as the theory goes) that all the draggables are in the memory of IE, kicking..
Now if the draggables fill the memory right on page load OR if they do so one-by-one using mouseover ..i think it doesn't matter.
Now i tried to counter this by creating a second observer which is supposed to reset the draggable on "mouseOut" and "buttonUp". It works pretty well and aims to free up memory this way by destroying the handle. If this really helps is written elsewhere.
However. What i really need is something to fix the Sortables with constraint:false, because from my expirience the problem with sortables is the collision detection. It is simple to compare. Just move a sortable item over a sortable list and then do the same outside the list. It is like day and night. I guess that the collision detection tries to apply itself but fails unhandled..
I think a possible fix would be to disable the collision detection anywhere but the list(s) itself. Maybe it is possible to hook in with a single Observer.. i don't know .. what you think? Ideas?
Best regards,
Kjell
Hmm, yes. maybe it's about time a factored that stuff out into a cohesive patch that people can bootstrap into their stuff more easily... I'll take a look and keep you posted.On 6/15/06, Gregory Hill <[EMAIL PROTECTED]> wrote:It might not be a bad idea to release a file that overloads the drag-drop stuff with all that, so we can share in the greatness J
Would it be non-trivial to implement that lazy-loading in a generic enough way that you could do that?
Greg
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Ryan Gahl
Sent: Thursday, June 15, 2006 11:04 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: Re: [Rails-spinoffs] Why such bad performance with IE ?
Do you have a ton of draggables on the page at a time (or droppables)?
If so, one work around is to "lazy load" the instantiation of the draggable object. That is, only actually make an element draggable at the very point at which dragging functionality is needed (in this case the mouseover event might be the longest you can wait). So, for each element-to-become-draggable, you set up a mouseover listener, which extends the element to become draggable (and also removes itself as a mouseover listener -- you don't need it past the first instance). If the mouse never goes over an element, it never needs to be a draggable, right? This minimizes the total number of objects in memory, and will reduce the amount of loop processing that goes on during dragging operations.
For Droppables, it can be a bit more tricky, but a similar technique can be employed. I've also gone as far as to override the dragdrop.js file to include a checkDropRelevance() function which allows me to bypass collision detection (a costly operation) if I know that a certain droppable doesn't even pertain to my draggable.
These techniques will improve overall performance on ALL browsers, though IE may be the most noticeable.
I had to engineer this approach in an app which generated an arbitrary number of draggables/droppables (based on number of DB records returns in a DataGrid) -- without it, the dragdrop code is quite inefficient.
On 6/15/06, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
Regarding DragDrop
I am wondering what the deal about Internet Explorer 6 is. My application is near to final and now while testing browsers all but the IE6 are running as supposed to. Any other browser is performing smooth movement while IE compared provides a very bad expirience. I've seen some "tuning" infos on this list but they are either outdated or not actually working or helping. Is there anything i could do about it? Is this a known issue or maybe only appears under special circumstances? Some details on the subject would be helpful. Maybe there is a way around it, even it means to sacrifice some functionality. Any help is much appreciated.
Thanks in advance- Kjell
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs