Python softmatcher using difflib impracticably slow
I recommend you try different approaches:


Use quick_ratio instead of ratio
Apply .lower().split(' ') to the data before sending it to the SequenceMatcher
Add a line somewhere that checks if the two strings are equal. In those cases don't call SequenceMatcher


The first approach will most likely reduce the overall run time, but decrease precision. The second approach should work pretty well, since SequenceMatcher knows how to handle lists and will match only two items: ['john', 'doe'] and ['john', 'doe'] instead of all the letters in the name.