Start splitting our code to reduce initial download

This isn't perfect, but we shave about 162 KiB off the initial
download by shifting the user settings, administration panels
and patch viewers into their own split points.

During the build we compress the deferredjs/ code, just like with
the *.cache.html files.  This is OK for the deferred code as GWT
dynamically loads the other segments by XHR rather than relying on
a <script /> tag.

Change-Id: Idc7fcdb78ebb54b4631596ff56f4355d1558d96b
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-12-19 19:22:48 -08:00
parent f511d760db
commit 21a846b87c
8 changed files with 283 additions and 167 deletions

View File

@@ -35,9 +35,10 @@ public class PageLinks {
public static final String MINE_STARRED = "mine,starred";
public static final String MINE_DRAFTS = "mine,drafts";
public static final String ALL_ABANDONED = "all,abandoned,n,z";
public static final String ALL_MERGED = "all,merged,n,z";
public static final String ALL_OPEN = "all,open,n,z";
public static final String TOP = "n,z";
public static final String ALL_ABANDONED = "all,abandoned," + TOP;
public static final String ALL_MERGED = "all,merged," + TOP;
public static final String ALL_OPEN = "all,open," + TOP;
public static final String ADMIN_GROUPS = "admin,groups";
public static final String ADMIN_PROJECTS = "admin,projects";
@@ -59,7 +60,7 @@ public class PageLinks {
}
public static String toChangeQuery(final String query) {
return "q," + KeyUtil.encode(query) + ",n,z";
return "q," + KeyUtil.encode(query) + "," + TOP;
}
protected PageLinks() {