Przeglądaj źródła

Merge pull request #155 from overleaf/em-dmp-timeout

Set the diff-match-patch timeout to 100ms
Eric Mc Sween 5 lat temu
rodzic
commit
9b561b1763
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      services/document-updater/app/js/DiffCodec.js

+ 3 - 0
services/document-updater/app/js/DiffCodec.js

@@ -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,