Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NDQOA-0002Ak-RL for mharc-grub-devel@gnu.org; Wed, 25 Nov 2009 17:31:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDQO7-00027G-Mm for grub-devel@gnu.org; Wed, 25 Nov 2009 17:31:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDQO3-00021j-Us for grub-devel@gnu.org; Wed, 25 Nov 2009 17:31:03 -0500 Received: from [199.232.76.173] (port=34153 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDQO3-00021S-LH for grub-devel@gnu.org; Wed, 25 Nov 2009 17:30:59 -0500 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:57541 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDQO2-0000Od-Fp for grub-devel@gnu.org; Wed, 25 Nov 2009 17:30:58 -0500 Received: from pinux (82-45-164-87.cable.ubr06.hari.blueyonder.co.uk [82.45.164.87]) by mail.pina.cat (Postfix) with ESMTP id A018F288F2FE5 for ; Wed, 25 Nov 2009 23:30:57 +0100 (CET) Received: by pinux (Postfix, from userid 1000) id 0ED4D8045; Wed, 25 Nov 2009 22:31:04 +0000 (GMT) Date: Wed, 25 Nov 2009 22:31:04 +0000 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20091125223104.GA1032@pina.cat> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: gettext: --no-hash in msgmft X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 22:31:03 -0000 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I'm thinking to disable the hash table in the .mo files. It's not used in Grub Kernel and it makes the size 10% bigger: In a 473 sentences po file with hash it's 30633 bytes and without 28109, so it 's not a big difference. Do we want to disable or it's just some KB in /boot/grub and we don't really mind? Explanation: the .mo files has a hash table (by default) but gettext grub module is not using the hash table (it does search by bisection). Why? a) code simpler and smaller b) for the number of strings the speed is not a big difference* c) less space used in /boot/grub/locale *: I haven't bencharmked Find attached a patch and below the changelog, if we want to apply you can give the ok. If we don't want we forget about it :-) ----- 2009-11-25 Carles Pina i Estany * Makefile.in ($MSGFMT): add option --no-hash. ----- I have a set of solutions if grub gettext module is slow and one would be to implement the hash table if needed. -- Carles Pina i Estany http://pinux.info --J2SCkAp4GZ/dPZZf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="no-hash.patch" === modified file 'Makefile.in' --- Makefile.in 2009-11-24 20:01:40 +0000 +++ Makefile.in 2009-11-25 22:21:33 +0000 @@ -483,7 +483,7 @@ $(foreach lang, $(LINGUAS), $(srcdir)/po po/%.mo: po/%.po $(MKDIR_P) $$(dirname $@) - $(MSGFMT) -c --statistics -o $@ $^ + $(MSGFMT) -c --statistics --no-hash -o $@ $^ .PHONY: all install install-strip uninstall clean mostlyclean distclean .PHONY: maintainer-clean info dvi dist check --J2SCkAp4GZ/dPZZf--