[New-bugs-announce] [issue11740] difflib html diff takes extremely long

Michael O'Rourke report at bugs.python.org
Fri Apr 1 23:25:39 CEST 2011


New submission from Michael O'Rourke <mkorourk at adobe.com>:

If you try to difference the attached files with difflib and a html difference it take 10 minutes or more. In comparison other differencing tools like windiff and araxis merge will show the diff within a second.

Example code I'm using is:


sourceText = open("source.xml", "rU").readlines()
targetText = open("target.xml", "rU").readlines()

html_diff = difflib.HtmlDiff(tabsize=4)
result = html_diff.make_file(sourceText, targetText, "Source", "Target", context=True, numlines=10)
f = open('c:/libdiff_html.html', 'w')
f.write(result)
finish()

----------
components: None
files: Example.zip
messages: 132767
nosy: mkorourk at adobe.com
priority: normal
severity: normal
status: open
title: difflib html diff takes extremely long
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file21500/Example.zip

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11740>
_______________________________________


More information about the New-bugs-announce mailing list