javier ramirez wrote: > Hi, > > I'm using scriptaculous for making two elements sortable and also for > moving children between each other. The code I'm using is pretty > straight forward. I have two divs, and i'm sorting the <p> elements > inside (i tried first with ul/li and the results were the same, just in > case you were wondering). A bit below you can find the piece of code I'm > using. > > Bottom line is, when the children in the element are a small number, > then everything goes perfect, but when the element has a lot of children > (~200) then there is a huge slowdown in performance. From the moment I > click until the script responds and lets me actually move the children > some seconds can pass by. I have observed this behaviour both on Mozilla > and IE. > > Any suggestions to improve performance here?
I think the problem is the way that the library searches the drop regions with every drag. It has to loop through the drop target regions with every move, calculate the positions and then see if the cursor is inside one. This will be slow and I think difficult to overcome. The Yahoo! UI dragdrop library is the same. I have ~1000 draggables and had to take a new approach that doesn't slow down no matter how many daggables and targets http://peter.michaux.ca/articles/2006/08/09/donut-dragdrop-release Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
