Optimized Saves

Our earliest beta has had an asynchronous save on every key press so far. Not anymore. From today onwards we debounce() changes every 500…

Optimized Saves

Our earliest beta has had an asynchronous save on every key press so far. Not anymore. From today onwards we debounce() changes every 500 milliseconds and then submit it to the server.

Here is a brilliant piece on JavaScript Debounce Function by David Walsh in case you’re wondering what debounce is.

function debounce(fn, delay) {
clearTimeout(editorTimer);
editorTimer = setTimeout(function() {
fn();
}, delay);
}

A pretty update. And that is that.