Code Splitting in GWT
A pain point for Google web applications is the time required to
over the lifespan of an app, because developers add more features and
those features require more code to support.
To address this, I extended
the Google Web Toolkit to
support code splitting. Some notable aspects of the project:
- It splits the code without respecting module boundaries, so that
developers can start using it without having to reorganize their
entire application according to the deployment strategy. This feature
was crucial for adoption, because developers never start code
splitting until their app has grown large enough to require
it. Serious development tools should never force developers
- I developed debugging debugging support based on the
Report. Any whole-program optimization has the downside that
changes by a developer have non-local effects. Whenever the
whole-program optimization cannot be avoided, it is important to
provide tool support for tracing the effects of those changes.
- I developed and documented techniques for evolving a code base to
minimize the non-local effects on the code splitter. In particular, I
Provider pattern to help control where lazy-loaded code is
The GWT code splitter is used
by Google Adwords
and Google Wallet, among many
other web applications.
GWT code splitter documentation for more information.