Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared Component Properties Bindings Values Provider incurs ComponentCache lock contention #2716

Closed
3 tasks done
adamcin opened this issue Oct 13, 2021 · 0 comments
Closed
3 tasks done

Comments

@adamcin
Copy link
Contributor

adamcin commented Oct 13, 2021

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: 6.5, Cloud Service
  • ACS AEM Commons Version: 5.0.0+
  • Reproducible on Latest? yes

Expected Behavior

The SharedComponentPropertiesBindingsValuesProvider must be performant, as it is executed on every sling script initialization for every supported scripting provider. It certainly should not be the reason that page rendering slows to a second or more.

Actual Behavior

As the number of components used on a page increases, the SCP BVP takes an increasingly long time to execute for each sling include.

This is visible in the log with statements similar to this:

org.apache.sling.scripting.core.impl.bundled.ScriptContextProvider Adding the bindings of com.adobe.acs.commons.wcm.properties.shared.impl.SharedComponentPropertiesBindingsValuesProvider took 2196 microseconds which is above the hardcoded limit of 1000 microseconds; if this message appears often it indicates that this BindingsValuesProvider has an impact on general page rendering performance

This appears to be caused by an attempt to retrieve the com.day.wcm.api.components.Component for the request resource, which invokes a synchronized path through the internal ComponentCache service.

Since the result of the WCMUtils.getComponent() call is only used to retrieve a consistent resource type relative path for reading shared properties, we shouldn't have to validate the presence of a proper cq:Component context in this class.

Links

Call to WCMUtils.getComponent

adamcin added a commit to adamcin/acs-aem-commons that referenced this issue Oct 13, 2021
adamcin added a commit to adamcin/acs-aem-commons that referenced this issue Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant