I was using a debug div to see what''s going on behind the scenes in IE6 (simple empty div id="debug", then filling it with: $ (''debug'').innerHTML += whatever... from different functions in dragdrop.js), when I noticed that if there was output to the debug div, the speed of dragging in IE6 is as good as FF and Opera. Can someone please explain this? In theory the speed of dragging should be a tiny bit slower, as text is outputted to the screen and displayed by the browser. But in fact the speed in IE6 is actually a lot faster, equal to the speed in FF and Opera! And it works even if the div is with style="display:none;" ! Perhaps IE6 needs a small delay somewhere to maintain the proper order of function calls or to break out of some kind of internal loops?.. Anyway, I came up with this really ugly speedfix for IE6 (and maybe7?) : 1. Make a div anywhere on the page with id="something" and style="display:none;" could be hard-coded or created with js only when the browser is IE. 2. Add " if( $(''something'') != null ) $(''something'').innerHTML pointer[0]; " to the updateDrag function in dragdrop.js, version 1.7.1_beta3, line 177 (line is empty). This will constantly output the cursor position while dragging. This has been tested in FF 2.0.0.4, Opera 9.21 and IE6. Can someone test it in IE7 and Safari? I also hope someone can explain why this works... --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
If that works that is awesome. :P I have used (''myElement'').innerHTML += moreHTML; and I find that my application gradually got slower because "innerHTML +=" must be replacing the entire HTML with oldHTML+moreHTML each time instead of just appending it. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 6/25/07, jdalton <jdalton001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > If that works that is awesome. :P > > I have used (''myElement'').innerHTML += moreHTML; > and I find that my application gradually got slower because "innerHTML > +=" must be replacing the entire HTML with oldHTML+moreHTML each time > instead of just appending it. >I created this patch which will allow a custom element to be created and shown as a ghosting effect instead of cloning the draggable object. I guess this might be what you are looking for. http://dev.rubyonrails.org/ticket/8386 Also, there was another patch which will speedup the initialization of objects as draggable, quite a bit http://dev.rubyonrails.org/ticket/8697 Cheers, -Surendra --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I did something like in your patch to initialize lots of draggable. (In fact I did it onclick) And yes it is really faster because you did nothing if user do not click on a draggable. But do you have a solution to speedup droppable initialisation ? And drag over lots of droppable ? Regards On 6/25/07, Surendra <singhi.surendra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 6/25/07, jdalton <jdalton001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > If that works that is awesome. :P > > > > I have used (''myElement'').innerHTML += moreHTML; > > and I find that my application gradually got slower because "innerHTML > > +=" must be replacing the entire HTML with oldHTML+moreHTML each time > > instead of just appending it. > > > > I created this patch which will allow a custom element to be created > and shown as a ghosting effect instead of cloning the draggable > object. I guess this might be what you are looking for. > > http://dev.rubyonrails.org/ticket/8386 > > > Also, there was another patch which will speedup the initialization of > objects as draggable, quite a bit > http://dev.rubyonrails.org/ticket/8697 > > Cheers, > -Surendra > > > >-- Jean-Philippe Encausse - Veille / R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
jdalton, I use append ( += ) for quick look behind the scenes while debugging in different browsers. It shows the browser differences nicely. But the dragging speed fix for IE6 doesn''t need to append. It only needs to output something to the browser while dragging, so ( = ) is enough: if( $(''something'') != null ) $(''something'').innerHTML = pointer[0]; Surendra, the initialization speedup works nicely, thanks. My problem was that the dragging in IE was slow and jerky, when moving a Sortable from one Droppable to another. I tried removing the handles and making the elements as simple as possible, but that didn''t help much. The droppables are with horizontal overlap and ghosting = false, as I need the Sortables to resize when dropped and that doesn''t work right with ghosting = true. On Jun 25, 1:12 am, "Jean-Philippe Encausse" <J...-vcK5r0oTKUrk1uMJSBkQmQ@public.gmane.org> wrote:> I did something like in your patch to initialize lots of draggable. (In > fact I did it onclick) > And yes it is really faster because you did nothing if user do not click on > a draggable. > > But do you have a solution to speedup droppable initialisation ? > And drag over lots of droppable ? > > Regards > > On 6/25/07, Surendra <singhi.suren...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > On 6/25/07, jdalton <jdalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > If that works that is awesome. :P > > > > I have used (''myElement'').innerHTML += moreHTML; > > > and I find that my application gradually got slower because "innerHTML > > > +=" must be replacing the entire HTML with oldHTML+moreHTML each time > > > instead of just appending it. > > > I created this patch which will allow a custom element to be created > > and shown as a ghosting effect instead of cloning the draggable > > object. I guess this might be what you are looking for. > > >http://dev.rubyonrails.org/ticket/8386 > > > Also, there was another patch which will speedup the initialization of > > objects as draggable, quite a bit > >http://dev.rubyonrails.org/ticket/8697 > > > Cheers, > > -Surendra > > -- > Jean-Philippe Encausse - Veille / R&D Jalios SA > Jp [at] encausse.net -http://www.encausse.com-http://www.jalias.com > GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net > Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: > +33958789015 > Do it Once, Use it Twice ~ Do it Twice, Make It Once--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---