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

Upgrade or replace mycila-guice

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Obsolete
    • Neutral
    • None
    • None
    • core

    Description

      We're using mycila-guice 2.10.ga which suffers from bad performance. This was reported in MAGNOLIA-5153 where we made the feature optional and disabled by default. I opened a ticket with mycila [1] and provided that a patch that made it into 2.15.ga. This version is not available on maven central unfortunately.

      Another option would be to replace mycila and implement support for @PostConstruct ourselves. Attached is a patch with exactly this.

      The patch contains a main method in NewInstanceTest that tests the performance improvement. It should not be merged into the product.

      Printout with Mycila Guice 2.10.ga:

      To create 1000000 instances of a class with a @PostConstruct method
      Time without Mycila: 204 ms 0 invocations
      Time with Mycila: 4253 ms 1000000 invocations
      Time with Patch: 187 ms 1000000 invocations

      To create 1000000 instances of a class without @PostConstruct method
      Time without Mycila: 174 ms 0 invocations
      Time with Mycila: 3921 ms 0 invocations
      Time with Patch: 174 ms 0 invocations

      Mycila 2.15.ga is considerably faster almost matching the patch.

      [1] https://code.google.com/p/mycila/issues/detail?id=47

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD