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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user