-
Notifications
You must be signed in to change notification settings - Fork 857
Closed
Description
Discovered this one from vidom's fast "clear rows" result and thought I'd pass it on.
If you run .textContent = "" after a requestAnimantionFrame, it saves 35-40ms in the "clear rows" benchmark.
So tweaked vanillajs-keyed Main.clear() looks like:
clear() {
startMeasure("clear");
this.store.clear();
this.rows = [];
this.data = [];
var that = this;
requestAnimationFrame(function () {
that.removeAllRows();
this.unselect();
});
stopMeasure();
}
Same trick saves about 5ms in the "replace all rows" test.
Metadata
Metadata
Assignees
Labels
No labels