[MGNLLIC-87] Reduce calls of synchronized methods in LicenceManager (backport for Magnolia 5.7.x) Created: 10/Feb/22  Updated: 10/Feb/22  Resolved: 10/Feb/22

Status: Closed
Project: Magnolia License
Component/s: Checker
Affects Version/s: 1.5.1, 1.6
Fix Version/s: 1.6.3

Type: Task Priority: Neutral
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Done Votes: 0
Labels: maintenance, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

We found that under heavy load threads get blocked through LicenseManager.getLicenseStatus() callĀ  as it is a synchronized method.

It was also found that this method is called:

1. once per request in the RegistrationFilter
2. once per use of some enterprise module, like MultisiteManager.isEELicensed()

Additionally the synchronized method calls System.getTimeMillis(), which also is expensive.


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