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

Optimizing ModuleBootstrapTask

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.15
    • 5.7.4, 6.1.2
    • None
    • Global Maintenance 3
    • 3

      When profiling a test similar to ModuleVersionHandlerTestCase, it turns out that ModuleBootstrapTask.accept() results in 60 million String.append() operations.
      That's because ModuleBootstrapTask.accept() is called number of modules times number of files in all JAR files, resulting in 20 million invocations.
      A simple optimization brought execution time for our test down from 110s to 60s, only by caching the result of the String operation. Any Magnolia startup with empty repository should profit similarly from this optimizaton. Please find attached the optimized class.

      Please consider an improvement here.

        Acceptance criteria

              nguyen.phung Nguyen Phung Chi
              viet.nguyen Viet Nguyen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1d 7h
                    1d 7h