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

Optimizing ModuleBootstrapTask

    XMLWordPrintable

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

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