Tuesday, January 31, 2012

Re: How to build a simple GWT event bus using Generators

Here's the size breakdown of the generated Javascript (*.cache.html)
under GWT 2.4 for the example app.

When the event bus' code generation is enabled, it includes all event
publishers whether or not they are used in the final app. When
disabled, only an empty PublisherFactoryRegistryImpl is generated to
satisfy the compiler. None of the publishers are generated.

Normal compile:
- Event bus disabled: 90 KB
- Event bus enabled: 110 KB

Compile without obfuscation (-style PRETTY):
- Event bus disabled: 250 KB
- Event bus enabled: 310 KB

Under a normal compile, the event bus overhead for each permutation is
about 20 KB on disk. This includes the event bus engine, the 17 built-
in GWT EventListeners, the ExceptionListener, and the SearchListener.
The actual overhead for unused EventListeners is somewhere below 20
KB, I'm guessing it's even below 10 KB.

I'm willing to live with a 10 KB overhead to use a simpler event bus.

Cheers,
Dele

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment