[MGNLRES-344] Also improve regex performance in ResourceTemplatingFunctions.generate() Created: 05/Feb/20  Updated: 29/Mar/22  Resolved: 27/Feb/20

Status: Closed
Project: Magnolia Resources Module
Component/s: resourceLoaders
Affects Version/s: 2.6.3
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Joerg von Frantzius Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLRES-319 Improve ResourcesTemplatingFunctions#... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Testcase included:
Yes
Date of First Response:
Epic Link: Support
Team: Nucleus

 Description   

With the PR integrated in MGNLRES-319, the following was improved:

  • support for glob patterns with good performance
  • regex pattern caching to improve regex performance a bit

This still leaves regex pattern performance horrible, as ~ 20,000 pattern matches are performed per call. Projects would need to switch to glob patterns in order to improve performance by dimensions.

PRĀ https://git.magnolia-cms.com/projects/MODULES/repos/resources/pull-requests/91 improves performance by dimensions also for regex expressions, by determining a prefix path where to start matching from.

Existing callers of resfn will profit from this without any code changes.



 Comments   
Comment by Richard Gange [ 05/Feb/20 ]

Thanks for this. We will take a look at it. Cheers!

Generated at Mon Feb 12 06:49:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.