> On 18 Dec 2018, at 09:10, Serge Ballesta via Python-ideas 
> <[email protected]> wrote:
> 
> In a project of mine, I have used the gettext module from Python Standard 
> Library. I have found that several tools could be used to generate the 
> Machine Object (mo) file from the source Portable Object (one): pybabel 
> (http://babel.pocoo.org/en/latest/ <http://babel.pocoo.org/en/latest/>), 
> msgfmt.py from Python tools or the original msgfmt from GNU gettext.

snip

> Before going further, I would like to know whether implementing lazy access 
> through the hash table that way seems to be a interesting improvement or a 
> dead end

I think about it this way.

Based on the largest project I have worked on that was internationalised into
14 languages the British English text translated to American English (en-US) 
created a 350KiB MO file.

The largest mo file was for Thai (th-TH) at 680KiB.

Is it worth the complexity of the hash code to save that memory?

Will the hash code improve the load time?
We never noticed the load time and we reloaded the MO on ever web page access.

As for FDs it uses 1 and on my linux system I have 1.6M to play with.

Barry

_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to