If you write a halfway decent microbenchmark, please add it to trunk/reference/Microbenchmarks/src/com/google/gwt/reference/microbenchmark
On Fri, Mar 5, 2010 at 9:19 AM, <jlaba...@google.com> wrote: > > http://gwt-code-reviews.appspot.com/159804/diff/1/3 > File user/src/com/google/gwt/dom/client/StyleInjector.java (right): > > http://gwt-code-reviews.appspot.com/159804/diff/1/3#newcode101 > Line 101: private static native int getDocumentStyleSheetLength(int idx) > /*-{ > I don't know for sure if reading cssText.length is slow, but I'm worried > that we had a reason to cache the length originally. I agree that there > is no way to cache the info because we can't control what happens > outside of GWT, so we wouldn't even know if external code modified the > style sheets. > > Can you just try injecting 40 large style sheets and compare the > performance before and after the change? At the very least, we should > warn people if its going to get really slow. > > > http://gwt-code-reviews.appspot.com/159804 > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors