[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: |
|
||||||||
| 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: | |||||||||
| Description |
|
With the PR integrated in
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! |