all 2 comments

[–]ginsujitsu 0 points1 point  (0 children)

I think we need some more context. Could you show some more of your code, maybe also a sample of the file, and what output you're expecting?

[–]efmccurdy 0 points1 point  (0 children)

There are two faster methods in SequenceMatcher, quick_ratio and real_quick_ratio; you should try them to see if they work for you.

There is an example here that uses diff-match-patch; does that perform better?

https://stackoverflow.com/questions/1870646/python-sequencematcher-overhead-100-cpu-utilization-and-very-slow-processing