Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7995

Optimise TranslationServiceImpl for better throughput


    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Neutral Neutral
    • 6.2.15
    • None
    • None
    • Yes
    • Yes
    • Yes

      • Avoid transitive references to Hashtable via Properties class. Hash table is a legacy map implementation with synchronised API and causes thread blocks under stress. It should be avoided, but Properties class unfortunately extends Hashtable and -> should be avoided as well. We can still consume the keys and values from the files via Properties, but store and expose them via more suitable hash map implementations.
      • Avoid excessive Guice injector invocations by defaultMessageBundlesLoaderProvider: the provider is not defined by us, it is generated by Guice (and is used iiuc only to defer the injection of DefaultMessageBundlesLoader after constructor is done). This results into an injector.getInstance call upon every interaction (pretty much every property resolution call) and is a blocker in a concurrent environment. Simple solution would be to define an explicit provider or optimise the injection somehow else, so that the callers interact with real object and not a provider at all.

        Acceptance criteria

              fgrilli Federico Grilli
              apchelintcev Aleksandr Pchelintcev
              0 Vote for this issue
              2 Start watching this issue


                  Task DoD