On Fri, Aug 7, 2009 at 3:57 AM, Benjamin Lerman <[email protected]<google%[email protected]> > wrote:
> When 2 permutations are very close to one another (a lot of deferred > binding will lead to the same implementation for the 2 permutations), > dynamic selection through indirection might not be that costly in > performance. There is also a loss because of some optimization that will > not take place, but one will have to accept that. > We already do this for runtime locales. For example, look at the Showcase sample in trunk. It only has 5 compile time locales for 25 permutations, but you get country-specific number/date/time formats and currency information for far more locales than that. The generated code is smart about which locales are equivalent for pieces of this and produces code to choose between only the individual implementations that are possible in a given permutation at runtime. Note that this is only viable where you don't have different translations for the different runtime locales, though you could imagine extending this concept to handle a small number of differences efficiently, the same way the currency data/etc is handled now (if you had most of the translations different it wouldn't be useful because the strings can wind up taking a significant portion of the compiled output). > Then GWT could have an option to say that such and such permutation > must be separated at runtime instead of compile time. That will allow > the compilation to be as quick as now, but the designers will still be > able to use the deferred binding mechanism to handle ie6/ie7 (for > example). > Doing it in a general way is much more complicated, because it isn't just in the compiler but to get efficient results each generator has to do the work. > Moreover, one can imagine an option to have all permutations separated > at runtime for speeding up the compilation in development mode. > For development, you should consider having a separate .gwt.xml file which limits the web compile to a single permutation. Also, most of your development should be done in hosted mode rather than doing web-mode compiles. -- John A. Tamplin Software Engineer (GWT), Google --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
