Multidomain translations slow hammer down
When hammer is installed with multiple plugins the startup slows down. Profiling showed we're loosing quite some time in fast-gettext's initialisation and translation methods. It loads all available .mo files for all languages in all plugins regardless what language is used. Another inefficiency lies in multidomain translations we're using (one domain per plugin). For each translation fast-gettext iterates over all domains until it finds the key.
Simple measurement for hammer with plugins:
Standard hammer configuration on ruby 1.9.3:
time hammer --help > /dev/null real 0m1.584s user 0m1.453s sys 0m0.130s
With only one translation domain:
time hammer --help > /dev/null real 0m1.109s user 0m1.017s sys 0m0.092s
The solution seems to be to create custom fast-gettext translation repository that would merge the keys at load time to get rid of the search loops in each translation. Loading the .mo files lazily might also improve the performance.