Re: How to write good performance code?

2010-07-15 Thread Sebastian Rothbucher
You might have a look @ http://code.google.com/events/io/2010/sessions/faster-apps-faster-gwt-compiler.html and @ http://code.google.com/events/io/2010/sessions/architecting-performance-gwt.html Some patterns are really helpful, esp. when it comes to minimizing we objects (so it's not just a micr

Re: How to write good performance code?

2010-07-14 Thread mP
This sort of micro optimisation is pointless as it will happen a few times here and there and costs nearly nothing in terms of CPU time. Creating a local variable or not, makes no difference. Local and other types of variables are being created all over the place. The browser is doing a thousand ot

Re: How to write good performance code?

2010-07-14 Thread Paul Stockley
I would say there is actually very little difference. Maybe 1 would be slightly faster due the missing assignment. The most efficient would probably be: public MyClass implements ClickHandler { public void onClick(com.google.gwt.event.dom.client.ClickEvent event) { Window.alert("msg")

Re: How to write good performance code?

2010-07-13 Thread Gal Dolber
Are you serious? If you are *creating the buttons dynamically* and you can declare the clickHandler as a field it will be faster cause you will be avoiding the handler instantiation every time... but I don't think that choice will have a performance impact.. 2010/7/13 cody > private final Butt

How to write good performance code?

2010-07-13 Thread cody
private final Button button; private final ClickHandler clickHandler; public MyClass(){ //Code 1 button.addClickHandler(new com.google.gwt.event.dom.client.ClickHandler() { public void onClick(com.google.gwt.event.dom.client.ClickEvent event)