On Thu, Apr 16, 2009 at 4:58 AM, Thomas Broyer <t.bro...@gmail.com> wrote:
> > > > On 16 avr, 08:30, Vitali Lovich <vlov...@gmail.com> wrote: > > I'm pretty sure that's wrong - inserting things into a table, detached or > > not, will still result, AFAIK, in DOM operations. > > ...but DOM operations on a detached tree is much faster because it > cannot cause a reflow or repaint (same for display:none DOM subtree). > See > http://ajaxian.com/archives/browser-reflows-how-do-they-affect-performance I think you need to re-read that. That applies to CSS not Javascript. Since Javascript is single-threaded (even with HTML5, DOM manipulation can only happen on 1 thread so this is still correct), these will not (at least they shouldn't from what I understand of browsers) trigger any reflows or repaints until the browser gets control back (when you finishing making all your DOM updates or if you use incremental commands). Thus you shouldn't see any performance benefits over inserting into a detached node or an attached node. > > and in general the articles in http://ajaxian.com/by/topic/performance > (you'd have to understand GWT internals to make use of some of the > advices; for instance, queueing [1] maps to GWT's DeferredCommand --do > not forget to push "pause" in the command queue-- and I believe that pauses aren't strictly necessary unless you know you absolutely need them because the information in the DOM won't be available until the next iteration of the event loop (I'm not 100% sure on this, so I could be very wrong). > > IncrementalCommand; and the memoizer can hardly be done as proposed Memoization is simply a technique for caching results of expensive calculations - language independant concept (even if expressed differently) > > without digging into JSNI, though the same result could be achieved in > pure Java using a different, probably non-reusable, pattern) > > [1] http://ajaxian.com/archives/speed-up-your-javascript-with-memoization > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---