On Thu, Apr 16, 2009 at 2:15 PM, Arthur Kalmenson <[email protected]>wrote:
> > > 1) Do I need to actually draw all 100 000 widgets at once? Can I > > display a portion of the data & defer the rest for a later point in > > time (perhaps doing it in the background) > > You can do that with IncrementalCommand, but at the end of the day > you're still going to choke the browser each time this needs to be > displayed. Well obviously you don't insert into the DOM. In THIS case, you build your widgets detached in incremental steps (maybe doing 100-500 milliseconds worth of processing each time). Once you're done, you attach the whole enchileda to the page. This actually becomes even easier with worker threads. > > > > 2) Why am I constantly recreating the widget structure instead of > > doing it once and simply changing the data displayed. > > That's fine, but you still need to create the widget and that's > what'll take a lot of time. If it takes 20 seconds to log into your > application because you're generating the grid in the background, > that's not going to make your users happy. Use the incremental thing above, & you won't. If applicable, you can also bury the "expensive" UI deeper in the navigation so that while the user is navigating to it, you're creating it in the background (obviously you don't make it redundantly deep - just hopefully it'll be in a natural location that doesn't need to be visible right away). > > -- > Arthur Kalmenson > > > > On Thu, Apr 16, 2009 at 2:08 PM, Vitali Lovich <[email protected]> wrote: > > > > On Thu, Apr 16, 2009 at 1:30 PM, Jason Essington > > <[email protected]> wrote: > >> > >> This is absolutely true, but we are not talking about day to day GWT > >> development, we are talking about extraordinary circumstances where > >> some amount of optimization is needed. > > I'm still not convinced that falling back to raw HTML & inserting it > > onto the page is the right answer - I'm confident there would be a way > > around it. Of course, I've never built a GWT app that tries to put a > > lot of widgets on the page, so I have no experience here (just > > conjecture). > > > >> > >> Under every normal circumstance you would simply develop using > >> widgets, but that becomes impossible if some use case says you need to > >> fill a 100,000 cell grid all at once. That sort of thing puts you into > >> a position where normal GWT development techniques just aren't able to > >> do the job. > > But the question should be as follows: > > 1) Do I need to actually draw all 100 000 widgets at once? Can I > > display a portion of the data & defer the rest for a later point in > > time (perhaps doing it in the background) > > 2) Why am I constantly recreating the widget structure instead of > > doing it once and simply changing the data displayed. > > > >> > >> If you are simply displaying (read only) data, there may be no reason > >> to add all the overhead of a heavyweight object like a widget, and > >> straight html may be the better option. > > meh - at that point why even bother with GWT? you're better off just > > serving up the HTML using regular Java servlets or PHP (unless you're > > getting HTML data from a third-party, in which case obviously it makes > > sense to use the raw HTML since there's no point in trying to parse > > it). > >> > >> -jason > >> > >> On Apr 16, 2009, at 11:13 AM, Vitali Lovich wrote: > >> > >>> The widgets save so much on development efforts. First of all, > >>> refactoring is trivial & won't break anything. It's trivial to build > >>> up new, complex* widgets using the framework & you don't have to worry > >>> about breaking your HTML generator. You don't need to assign unique > >>> ids to every single widget so that you can access them. The API for > >>> modifying widgets is far easier & more extensible to use than building > >>> up the HTML from scratch. > >> > >> > >> > > >> > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
