views:

346

answers:

1

Regarding setting Django's USE_I18N = False in settings.py the documentation say:

A boolean that specifies whether Django's internationalization system should be enabled. This provides an easy way to turn it off, for performance.

and:

If you don’t use internationalization, you should take the two seconds to set USE_I18N = False in your settings file.

This makes it sound like a big deal. Can anybody give me some information on how much performance I'm really gaining by turning it off until I need it?

+1  A: 

It's not a big deal. The only real change affects the *gettext family of functions available in the django.utils.translation package. If you set USE_I18N=False then Django will replace these functions with a faster implementation that doesn't actually try to translate the text. If you're not using any of the Django translation utils then it shouldn't matter one way or the other. Even if you are using these functions, they're fast enough that any performance gains will be imperceptible.

mmalone
That seems in line with what I've been seeing in my testing. Memory usage didn't decrease at all and queries were no quicker... Funny that the docs make such a strong case for it.
Gabriel Hurley
Submit a patch to tone them down.
Paul McMillan