Slow function is slow
I was wondering why the test suite that I’m writing for a Python web framework took so long to execute, and the profiler revealed that nearly all the time was taken by… the _hashlib.pbkdf2_hmac
function. Sigh
(The purpose of this function to hash passwords so they can be securely stored in a database, and to take time executing so the hashing cannot easily be reversed)
It keeps happening
Update: deployed to production on an older ARM SBC that happens to be much slower than my desktop. Logins take several seconds. Guess what was the culprit?