Details
-
Improvement
-
Resolution: Fixed
-
Neutral
-
2.6.3
-
None
-
-
Empty show more show less
-
Yes
-
UI Framework & 6.2 Ramp up 15
-
2
Description
As described in SUPPORT-9441,
info.magnolia.modules.resources.templating.ResourcesTemplatingFunctions#generate method used by resfn, scans all the files and directories of the resources directory + all the files found on the classpath to match their path with the provided js or css path that is always considered as a potential regexp.
The recursive scanning of the resource directory is very expensive when you have a lot of light modules (especially in Java 8 due to https://bugs.openjdk.java.net/browse/JDK-8153414).
And matching, by default, every file path with the provided path is very expensive in terms of CPU usage.In our context, removing the calls to resfn multiplied the throughput by 3 on non cached pages.
There should be an extra function to allow us to provide the complete path of the resources so that the scanning + pattern matching is not forced.
Providing a cache for already scanned resources would significantly reduce system load - which is an expected result.
Checklists
Attachments
Issue Links
- is related to
-
MGNLRES-344 Also improve regex performance in ResourceTemplatingFunctions.generate()
-
- Closed
-
- mentioned in
-
Page Loading...