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