On Tue, Jan 3, 2017 at 1:14 PM, Adam Johnson <m...@adamj.eu> wrote: > But, to be consistent with Django 1.x going forward, let's define 36,000 >> iterations as "acceptable performance" for a Python2 with Django 1.11 >> install on a typical piece of server hardware today (beginning of 2017). A >> useful benchmark would be to determine how many iterations would yield the >> same delay on a Py3 + Django 1.11 install on the same server. >> > > That sounds like a sensible benchmark to see where we are at current. I > think Django should be aiming for 100k+ as default at least to match the > Python docs though. Let's not forget that users can tweak it down as well > as up if they do have problems with the execution time. >
I agree; this seems like a strong argument for setting it appropriately high and documenting that it can be decreased if required, rather than setting low enough that it won't cause an issue on any hardware and documenting that developers should increase it (which seems less likely to happen, IMO). If the Python docs <https://docs.python.org/3/library/hashlib.html#hashlib.pbkdf2_hmac> are correct and the Python 3 pbkdf2_hmac implementation is 3x faster than the version in Python 2, 100,000 would seem to be a fairly unobjectionable (perhaps even a bare minimum) starting point, given we're starting with around 30,000-36,000 in current Django. That said, that recommendation is also ~4 years old at this point, so some benchmarks or at least further research may be in order... Tobias -- *Tobias McNulty*Chief Executive Officer tob...@caktusgroup.com www.caktusgroup.com -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMGFDKSR9UL4MikuzB-b%3D_1%2BDr5d2x5OK7maatV4ifwdUjkVyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.