1
0
mirror of https://github.com/django/django.git synced 2025-04-09 15:59:41 +00:00
Alex Gaynor ee86bf24d2 [1.8.x] Optimized allow_lazy() by not generating a new lazy wrapper on each invocation.
This dramatically improves performance on PyPy. The following benchmark:

python -mtimeit -s "from django.utils.functional import allow_lazy; from django.utils.translation import ugettext_lazy; f = allow_lazy(lambda s: s, str)" "f(ugettext_lazy('abc'))"

goes from 390us per loop to 165us.

Backport of 82e0cd15711c7171aed7af5e481967cc721c9642 from master
2015-02-08 14:57:19 -05:00
..
2013-11-02 13:12:09 -07:00
2013-11-03 10:08:55 -08:00
2013-11-02 15:27:47 -04:00
2014-03-27 17:48:12 -04:00
2015-01-02 12:35:41 -05:00
2013-11-02 19:53:29 -04:00
2013-11-02 13:12:09 -07:00