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

Optimise TranslationServiceImpl for better throughput

XMLWordPrintable

    • 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
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD