Use a faster password hasher in test_sqlite.py
|Reported by:||akaariai||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)
Changed 4 years ago by akaariai
comment:1 Changed 4 years ago by aaugustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted