Author Mahmoud Al-Qudsi
Recipients Mahmoud Al-Qudsi
Date 2017-09-23.17:01:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506186079.9.0.109617070031.issue31561@psf.upfronthosting.co.za>
In-reply-to
Content
While using the icdiff command line interface to difflib, I ran into an interesting issue where difflib took 47 seconds to compare two simple text documents (a PHP source code file that had been refactored via phptidy).

On subsequent analysis, it turned out to be some sort of pathological behavior triggered by the presence of mixed line endings. Normalizing the line endings in both files to \r\n via unix2dos and then comparing (making no other changes) resulted in the diff calculation completing in under 2 seconds.

I have attached the documents in question (file1 and file2) to this bug report.
History
Date User Action Args
2017-09-23 17:01:20Mahmoud Al-Qudsisetrecipients: + Mahmoud Al-Qudsi
2017-09-23 17:01:19Mahmoud Al-Qudsisetmessageid: <1506186079.9.0.109617070031.issue31561@psf.upfronthosting.co.za>
2017-09-23 17:01:19Mahmoud Al-Qudsilinkissue31561 messages
2017-09-23 17:01:18Mahmoud Al-Qudsicreate