Use a faster password hasher in test_sqlite.py
|Reported by:||Anssi Kääriäinen||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently Django uses
django.contrib.auth.hashers.PBKDF2PasswordHasher as the highest priority PASSWORD_HASHERS choice. This hasher is somewhat slow by design. The slowness results in 10% overhead on my machine compared to use of
MD5PasswordHasher. The test is ./runtests.py --settings=test_sqlite.py, result is ~670s vs ~610s. On other databases the gained performance advantage is lost in the noise.
This is related to ticket #18157, which is about documenting the use of different default hasher in testing as an optimisation.
I noticed that the tests error out if the PASSWORD_HASHERS do not contain all of the inbuilt hashers. Is this something that needs fixing?
Change History (5)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|