[diffoscope] 01/01: diff: reduce MAX_WF_SIZE to save time

Ximin Luo infinity0 at debian.org
Wed Jul 5 16:43:30 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository diffoscope.

commit 624fa881f110c9ea74f440272834222e26e4bfa4
Author: Ximin Luo <infinity0 at debian.org>
Date:   Wed Jul 5 16:43:12 2017 +0200

    diff: reduce MAX_WF_SIZE to save time
---
 diffoscope/diff.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffoscope/diff.py b/diffoscope/diff.py
index 758c6fe..17a5289 100644
--- a/diffoscope/diff.py
+++ b/diffoscope/diff.py
@@ -293,7 +293,7 @@ def color_unified_diff(diff):
 
 DIFFON = "\x01"
 DIFFOFF = "\x02"
-MAX_WF_SIZE = 2048 # hitting this limit uses up 1-2GB
+MAX_WF_SIZE = 1024 # any higher, and linediff takes >1 second and >200MB RAM
 
 def _linediff_sane(x):
     # turn non-printable chars into "."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list