Improve message download performance

This commit is contained in:
Scott Nonnenberg 2019-09-26 12:56:31 -07:00
parent 957f6f6474
commit 0c09f9620f
32 changed files with 906 additions and 633 deletions

View file

@ -83,7 +83,7 @@
checkTapToViewMessages();
}, wait);
}
const throttledCheckTapToViewMessages = _.throttle(
const debouncedCheckTapToViewMessages = _.debounce(
checkTapToViewMessages,
1000
);
@ -92,8 +92,8 @@
nextCheck: null,
init(events) {
checkTapToViewMessages();
events.on('timetravel', throttledCheckTapToViewMessages);
events.on('timetravel', debouncedCheckTapToViewMessages);
},
update: throttledCheckTapToViewMessages,
update: debouncedCheckTapToViewMessages,
};
})();