mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Set the diff-match-patch timeout to 100ms
This might result in worse diffs, but we don't want to spend a second blocking the event loop while we figure out nicer diffs when comparing documents.
This commit is contained in:
parent
9af14ef513
commit
98f8d7f51c
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
const DMP = require('diff-match-patch')
|
||||
const dmp = new DMP()
|
||||
|
||||
// Do not attempt to produce a diff for more than 100ms
|
||||
dmp.Diff_Timeout = 0.1
|
||||
|
||||
module.exports = {
|
||||
ADDED: 1,
|
||||
REMOVED: -1,
|
||||
|
|
Loading…
Reference in a new issue