Hugh Brown added the comment: I came across this problem today when I was using a 1000+ column CSV from a client. It was taking about 15 minutes to process each file. I found the problem and made this change:
# wrong_fields = [k for k in rowdict if k not in self.fieldnames] wrong_fields = set(rowdict.keys()) - set(self.fieldnames) And my processing time went down to 12 seconds per file -- a 75x speedup. It's kind of sad that this change has been waiting for over three years when it is so simple. Any chance we could make one of the acceptable code changes and release it? ---------- nosy: +hughdbrown _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18219> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com