mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #89 from sharelatex/bg-slow-connection-fix
increase allowed op backlog and flush tolerance
This commit is contained in:
commit
fe12a341e1
2 changed files with 3 additions and 3 deletions
|
@ -162,7 +162,7 @@ define [
|
||||||
clearChaosMonkey: () ->
|
clearChaosMonkey: () ->
|
||||||
clearTimeout @_cm
|
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: () ->
|
pollSavedStatus: () ->
|
||||||
# returns false if doc has ops waiting to be acknowledged or
|
# returns false if doc has ops waiting to be acknowledged or
|
||||||
|
|
|
@ -104,8 +104,8 @@ define [
|
||||||
getInflightOp: () -> @_doc.inflightOp
|
getInflightOp: () -> @_doc.inflightOp
|
||||||
getPendingOp: () -> @_doc.pendingOp
|
getPendingOp: () -> @_doc.pendingOp
|
||||||
getRecentAck: () ->
|
getRecentAck: () ->
|
||||||
# check if we have received an ack recently (within the flush delay)
|
# check if we have received an ack recently (within a factor of two of the single user flush delay)
|
||||||
@lastAcked? and new Date() - @lastAcked < @_doc._flushDelay
|
@lastAcked? and new Date() - @lastAcked < 2 * SINGLE_USER_FLUSH_DELAY
|
||||||
getOpSize: (op) ->
|
getOpSize: (op) ->
|
||||||
# compute size of an op from its components
|
# compute size of an op from its components
|
||||||
# (total number of characters inserted and deleted)
|
# (total number of characters inserted and deleted)
|
||||||
|
|
Loading…
Reference in a new issue