Very cool find.
On Fri, Oct 30, 2009 at 8:00 PM, <[email protected]> wrote:
> Note, that if you don't desire correct stack traces, you can use the
> following construct:
>
> _.foo = function() { ... }
>
> This results in a 6% post-gzip size reduction on Showcase. It might be
> useful to introduce a permutation parameter like
> "stripStackInformation", like -XdisableClassMetadata to enable this
> feature.
>
Please add an issue to go back and actually add this ability. 6% on Showcase
is too good to turn down; likely it would be even bigger on real-world apps
with lots more patterns that induce runtime polymorphism.
In terms of design, I think this would actually be best as a
permutation-specific conditional deferred binding property that the compiler
is sensitive to (that was a mouthful), so that it would be possible to let
app developers control how many stack trace-enabled users there are, in the
same way they can control how many users get the expensive emulated stack
traces on IE. I would guess something like <= 10% would need stack traces
enabled to still get good stats.
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---