Project

General

Profile

« Previous | Next » 

Revision b6b6ffc0

Added by Lukáš Zapletal about 3 years ago

Fixes #31717 - lazy-load fast_gettext for faster boot (#8275)

It's because we switch over all 20 languages to actually pull language name in the native language into a list of available languages. We use that in three places: settings page, user page and GraphQL.

This can be easily be lazy-loaded, so those 2 seconds are not wasted during startup. Only few languages are usually used, definitely not all of them.

Ewoud had a good point that this would prevent from sharing the translation cache (about 20MB) so we actually preload translations, but only in production. This way we can enjoy startups of Foreman in a dev environment by 2 seconds (which is actually 17% by local testing) while preloading everything in production (where the operation is a bit faster and reboot time not so painful).

  • added
  • modified
  • copied
  • renamed
  • deleted