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 <car...@pina.cat> * 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
=== 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
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel