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

Performance: Resource origin should include fewer resources by default

XMLWordPrintable

    • Yes
    • Yes
    • Yes

      If you install vanilla magnolia (no light modules) and create and execute ResourceVisitor to go through all resources observed by the system, you will get number in vicinity of 10K. While it doesn't seem to slow down the system in any way, and might be possibly useful in dev mode (I presume number comes from observation of classpath) where files on classpath can indeed change, i think in production we could reduce the number and thus increase performance in all places that traverse resources (e.g. resfn, definitions app, etc).

      Issue was discovered when investigating rendering performance issue in instance with node_modules directory in light module (brought in by use of webpack) and it containing additional 30K files (facepalm). This fact, together with multiple calls to resfn in single template lead to performance issue (traversing of 40K files while searching for resources took approx 2 seconds).

        Acceptance criteria

          1. after-fix-definition-app.png
            after-fix-definition-app.png
            411 kB
          2. after-fix-resource.png
            after-fix-resource.png
            352 kB
          3. before-fix-definition-app.png
            before-fix-definition-app.png
            356 kB
          4. before-fix-resource-app.png
            before-fix-resource-app.png
            347 kB
          5. debug.png
            debug.png
            854 kB

              oanh.thai Oanh Thai Hoang
              had Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 5h
                    5h