On Tue, 2009-02-17 at 03:55 -0800, alan wrote:
> Following up on this discussion:
> http://groups.google.com/group/django-users/browse_thread/thread/83f7b9b93973671f/e4b40ec5a482d155?hl=fr&lnk=gst&q=jsi18n+cache#e4b40ec5a482d155
> 
> How about a solution where the js i18n file would contain all the
> translations for all the languages (in a dictionary indexed by
> language)?

That could be a potentially huge file. You'll only be using 2% of it,
even with the current number of translations. Lots of unnecessary
information sent over the wire there.

> This way, the file could be cached by the browser (because non
> language cookie dependent).
> Of course it would require more bandwidth to transfert but:
> - it would be transfered only once per client

You're sending literally 50x more data per page than you would at the
moment. We already send a bit more information than we have to, since we
send all translations, rather than just those needed for a particular
page (that's kind of hard to solve). It's survivable because web pages
are reasonably regular (and repetitive), but a bit fragile.

It also has to be checked for updates on the same frequency as the page
data itself (and will change anytime the page changes). You'll get some
reuse, but I'd want to see some more concrete numbers on potentially
real-world-style data to be convinced about this.

Hand-waving doesn't work here. You have to make some real measurements
and carefully control for all the variables.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to