mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 16:01:27 +00:00
Merge pull request #10505 from overleaf/td-share-js-memory
Remove memory-hogging serverOps from ShareJS document GitOrigin-RevId: 31840fd775a4babb6db3ae1e45f6f214f0e2564f
This commit is contained in:
parent
11e789229e
commit
deb6e31e06
1 changed files with 1 additions and 9 deletions
10
services/web/frontend/js/vendor/libs/sharejs.js
vendored
10
services/web/frontend/js/vendor/libs/sharejs.js
vendored
|
@ -928,9 +928,6 @@ define(['ace/ace','crypto-js/sha1'], function (_ignore, CryptoJSSHA1) {
|
|||
// All ops that are waiting for the server to acknowledge @inflightOp
|
||||
this.pendingOp = null;
|
||||
this.pendingCallbacks = [];
|
||||
|
||||
// Some recent ops, incase submitOp is called with an old op version number.
|
||||
this.serverOps = {};
|
||||
}
|
||||
|
||||
// Transform a server op by a client op, and vice versa.
|
||||
|
@ -1169,7 +1166,6 @@ define(['ace/ace','crypto-js/sha1'], function (_ignore, CryptoJSSHA1) {
|
|||
throw new Error('Invalid version from server');
|
||||
}
|
||||
|
||||
this.serverOps[this.version] = oldInflightOp;
|
||||
this.version++;
|
||||
this.emit('acknowledge', oldInflightOp);
|
||||
var _iteratorNormalCompletion13 = true;
|
||||
|
@ -1219,11 +1215,7 @@ define(['ace/ace','crypto-js/sha1'], function (_ignore, CryptoJSSHA1) {
|
|||
|
||||
// p "if: #{i @inflightOp} pending: #{i @pendingOp} doc '#{@snapshot}' op: #{i msg.op}"
|
||||
|
||||
var op = msg.op;
|
||||
|
||||
this.serverOps[this.version] = op;
|
||||
|
||||
var docOp = op;
|
||||
var docOp = msg.op;
|
||||
if (this.inflightOp !== null) {
|
||||
var _Array$from9 = Array.from(this._xf(this.inflightOp, docOp));
|
||||
|
||||
|
|
Loading…
Reference in a new issue