This patch increases the reported fps in GridResizeTerror from 12 to 35
in my Chrome if only changing the height. No automatic test since
performance testing on our shared testing infrastructure would be quite
error-prone.
Change-Id: I327391dc04dde72a6e770df3b564ae8d4e3c15bb
/** @see Grid#autoColumnWidthsRecalculator */
private class AutoColumnWidthsRecalculator {
+ private double lastCalculatedInnerWidth = -1;
private final ScheduledCommand calculateCommand = new ScheduledCommand() {
} else {
calculate();
}
+ lastCalculatedInnerWidth = escalator.getInnerWidth();
}
};
@Override
public void execute() {
- recalculateColumnWidths();
+ if (escalator.getInnerWidth() != autoColumnWidthsRecalculator.lastCalculatedInnerWidth) {
+ recalculateColumnWidths();
+ }
}
});
}