Stop building a large PatchTable if the user navigates away

There is no point in building the HTML string up anymore,
or even populating the table, if the user isn't going to
view the text when its complete.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-01-23 11:33:27 -08:00
parent 536c050323
commit 20819ad139

View File

@@ -167,6 +167,13 @@ public class PatchTable extends FancyFlexTable<Patch> {
@SuppressWarnings("fallthrough")
public boolean execute() {
if (!isAttached()) {
// If the user navigated away, we aren't in the DOM anymore.
// Don't continue to render.
//
return false;
}
start = System.currentTimeMillis();
switch (stage) {
case 0: