Colin Alworth
unread,Jul 17, 2011, 6:02:43 PM7/17/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
The compiler will make the methods it can into static calls. As far as making an instance static (i.e. making a singleton), this probably won't gain you anything for a Cell, which has very little state, but in the case of very large widgets/composites, it might make sense to do.
So Cell, probably not worth it, and Widget, possibly, only if it is very expensive to create. As with almost all optimizations, profile first, then optimize. And make sure you optimize the compiled Javascript, not the Java (though you probably want to compile to PRETTY or DETAILED so you know what to work on).