Does GWT optimize inefficient code?

2013-02-01 Thread Joel Cairney
Dear forum, I've searched as hard as I can, but I haven't found any information on what specific developer practices GWTs compiler optimizations might optimize out. For instance: for(int i = 0; i myList.size(); i++) {...} or in the presenter: getView().doAction(); for every action,

Re: Does GWT optimize inefficient code?

2013-02-01 Thread Dennis Haupt
the first one: unlikely - the size might change in the loop the second one is more likely Am 01.02.2013 19:27, schrieb Joel Cairney: Dear forum, I've searched as hard as I can, but I haven't found any information on what specific developer practices GWTs compiler optimizations might

Re: Does GWT optimize inefficient code?

2013-02-01 Thread Colin Alworth
What about the first could be optimized out - just the size() accessor? Most List implementations have a size field (see http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/super/com/google/gwt/emul/java/util/ArrayList.java?r=6609#77 for the actual ArrayList used in compiled

Re: Does GWT optimize inefficient code?

2013-02-01 Thread Jens
Just compile your app in PRETTY or DETAILED mode and you will see how different the code can end up compared to what you have written in Java ;-) GWT does a pretty good job in optimizing your code. -- J. -- You received this message because you are subscribed to the Google Groups Google Web