mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02: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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user