Implement server-side GWT permutation selection
Rather than downloading and evaluating a large $module.nocache.js
page into the browser, perform the module evaulation on the server
side using the HttpServletRequest's headers.
In the case of Gerrit Code Review, which only has the 6 standard
browser permutations, the $module.nocache.js file is 5179 bytes.
Performing server side selection and inlining the result into the
host page completely removes this HTTP request, its local disk
cache space, and the network transfer costs.
The server side selected host page, including a single theme
stylesheet reference, is about 519 bytes larger than the same
page using a <script src="$module.nocache.js"> reference.
Signed-off-by: Shawn O. Pearce <firstname.lastname@example.org>
7 files changed