From 15997ea78283c02ff26db56070b6e5d637941b10 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Wed, 1 Nov 2017 14:19:41 +0000 Subject: [PATCH] increase allowed op backlog and flush tolerance --- services/web/public/coffee/ide/editor/Document.coffee | 2 +- services/web/public/coffee/ide/editor/ShareJsDoc.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/public/coffee/ide/editor/Document.coffee b/services/web/public/coffee/ide/editor/Document.coffee index 459f033ac6..b6ea177fc8 100644 --- a/services/web/public/coffee/ide/editor/Document.coffee +++ b/services/web/public/coffee/ide/editor/Document.coffee @@ -162,7 +162,7 @@ define [ clearChaosMonkey: () -> clearTimeout @_cm - MAX_PENDING_OP_SIZE: 30 # pending ops bigger than this are always considered unsaved + MAX_PENDING_OP_SIZE: 64 # pending ops bigger than this are always considered unsaved pollSavedStatus: () -> # returns false if doc has ops waiting to be acknowledged or diff --git a/services/web/public/coffee/ide/editor/ShareJsDoc.coffee b/services/web/public/coffee/ide/editor/ShareJsDoc.coffee index f580c56f77..569a6c7a9f 100644 --- a/services/web/public/coffee/ide/editor/ShareJsDoc.coffee +++ b/services/web/public/coffee/ide/editor/ShareJsDoc.coffee @@ -104,8 +104,8 @@ define [ getInflightOp: () -> @_doc.inflightOp getPendingOp: () -> @_doc.pendingOp getRecentAck: () -> - # check if we have received an ack recently (within the flush delay) - @lastAcked? and new Date() - @lastAcked < @_doc._flushDelay + # check if we have received an ack recently (within a factor of two of the single user flush delay) + @lastAcked? and new Date() - @lastAcked < 2 * SINGLE_USER_FLUSH_DELAY getOpSize: (op) -> # compute size of an op from its components # (total number of characters inserted and deleted)