[DATACMNS-1534] Cache BeanFactory lookup for EvaluationContextExtension. Created: 14/May/19  Updated: 14/May/19  Resolved: 14/May/19

Status: Resolved
Project: Spring Data Commons
Component/s: Core
Affects Version/s: 2.2 M4 (Moore), 2.1.8 (Lovelace SR8)
Fix Version/s: 2.2 RC1 (Moore), 2.1.9 (Lovelace SR9)

Type: Improvement Priority: Minor
Reporter: Christoph Strobl Assignee: Christoph Strobl
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is related to DATAMONGO-2267 Property population resolves collecti... Resolved
is related to DATACMNS-1260 Extract EvaluationContextProvider and... Closed
Last updater: Oliver Drotbohm
Pull Request URL: https://github.com/spring-projects/spring-data-commons/pull/395
Sprint: Moore RC1


The ExtensionAwareEvaluationContextProvider uses a Supplier to provide EvaluationContextExtension when creating the ExtensionAwarePropertyAccessor on obtaining the EvaluationContext via #getEvaluationContext(Object).
This triggers a BeanFactory lookup for availbale EvaluationContextExtension each time an EvaluationContext is requested.

Looking at DATAMONGO-2267 about 11% of the total time taken is spent looking up extensions.

o.s.d.spel.ExtensionAwareEvaluationContextProvider.getEvaluationContext(Object) 15%
o.s.d.spel.ExtensionAwareEvaluationContextProvider$$Lambda$476.get() 11%
o.s.b.f.support.DefaultListableBeanFactory.getBeanNamesForType(Class, boolean, boolean) 10%

Generated at Wed Jul 15 08:44:08 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.