I dunno about that one two fronts: 1) All the same DOM elements still have to be created. This would only help if you have such a slow JS engine in your browser that running the DOM manipulations in Javascript is so slow that it outweighs the cost of actually performing the manipulations (which I believe would always be done in native code anyways)
2) You're transmitting more data across the pipe - the extra markup is unnecessary data & can bloat your transfer by quite a bit, slowing down your responsiveness. 3) It's not scalable. Your moving rendering code from the client to the server which places more load on the server. Performing string concatenations also isn't cheap (unless you build your own string class that offers fast concatenation through pointers to strings & perform all the stream output yourself). Obviously if the number of users is limited you don't care. So all 3 reasons together (mainly 1 & 2 though), I don't see how that would help. Obviously some hard numbers are needed as all this is just hand waving guesses of expected behaviour. On Thu, Apr 16, 2009 at 10:55 AM, Arthur Kalmenson <arthur.k...@gmail.com>wrote: > > Just asked a GWT wizard on IRC and turns out I was incorrect. He > offered an interesting alternative solution. Build the table as HTML > and send that down instead. > > -- > Arthur Kalmenson > > > > On Thu, Apr 16, 2009 at 10:46 AM, Ian Bambury <ianbamb...@gmail.com> > wrote: > > 2009/4/16 Vitali Lovich <vlov...@gmail.com> > >> > >> You seem to be saying that: > >> > >> tree t = new tree() > >> t.addItem("abc"); > >> t.addItem("def"); > >> RootPanel.get().add(t); > >> > >> will have fewer reflows than > >> > >> tree t = new tree() > >> RootPanel.get().add(t) > >> t.addItem("abc") > >> t.addItem("def") > >> > >> According to you (at least from what you've said so far) is that the 1st > >> snippet will cause 1 DOM reflow whereas the below snippet will cause 2, > >> which isn't actually the case AFAIK. Both will only cause 1 & will be > >> equally fast. > > > > I think you are both right, depending on the browser you are in. > > FF2 (IIRC) will rerender during a sequence where most other browsers > won't. > > I don't know when it decides to do that, but most other browsers would be > > still displaying your splash screen while FF2 has hidden it and has stuff > > dancing about on the screen. > > OTOH, if you widget is not attached and you are setting percentage > heights > > and widths, for example, they will fail. > > Ian > > > > http://examples.roughian.com > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---