Throttling session calls due to performance issues
This commit is contained in:
1 parent
8832f101ad
commit
3732d7cf70
1 file changed
+3
-4
@@ -15,16 +15,15 @@ LayoutManager = class LayoutManager {
|
||||
this.viewportData = [];
|
||||
|
||||
this.isZoomed = false;
|
||||
|
||||
const updateSessionFn = () => Tracker.afterFlush(() => Session.set('LayoutManagerUpdated', Random.id()));
|
||||
this.updateSession = _.throttle(updateSessionFn, 300);
|
||||
}
|
||||
|
||||
getNumberOfViewports() {
|
||||
return this.layoutProps.rows * this.layoutProps.columns;
|
||||
}
|
||||
|
||||
updateSession() {
|
||||
Tracker.afterFlush(() => Session.set('LayoutManagerUpdated', Random.id()));
|
||||
}
|
||||
|
||||
setDefaultViewportData() {
|
||||
var numViewports = this.getNumberOfViewports();
|
||||
|
||||
|
||||
Reference in new issue
Block a user