[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:
Relate
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

 Description   

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 Mon Jan 27 05:42:23 UTC 2020 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.