Update `IndexedElementsBinder` so that bind operations are faster at
the expense of not checking that all elements have been bound. The
updated code now uses a window of 10 elements and assumes that if
no elements are missing from that window then exhaustive checking is
not required.
Closes gh-44867
Replace a few usages of stream with simple for loops. Although
this doesn't seem to make much difference to performance, it does
help when profiling applications since it reduces the stack
depth.
Add a simple cache that is used for the system environment property
source to cache `containsDescendantOf` results since descendants
cannot be used due to the more complicated algorithm.
Closes gh-44863
Update `ConfigurationPropertySource` adapters so accessing the
`SystemEnvironmentPropertySource` is handled by directly calling
the source.
This saves potentially expensive calls to `resolvePropertyName`
which are unnecessary since mappings are handled directly.
Closes gh-44862
Introduce a general purpose cache in the `Binder` and make use of it
in `JavaBeanBinder` and `ValueObjectBinder` to reuse potentially
expensive operations.
Closes gh-44861
Add `ConfigurationPropertyCaching.override()` method which can be
used to temporarily enable caching for the duration of an
operation.
The `Binder` now uses this method to ensure that caching is
enabled whilst a set of related binding operations are performed.
Closes gh-44860
Update `SystemEnvironmentPropertySourceEnvironmentPostProcessor` so
that our origin aware subclass is marked as immutable. This aligns
with the behavior we had before introducing origin tracking, which
assumes that environment variables changes made after the application
starts are not re-bound.
Closes gh-44859
Update `ConfigurationPropertyName` to improve performance of
the `equals(...)` and `hashCode()` methods by making the
following changes:
- Move element hashCode logic to Element and cache the results
- Exit the equals method early if hashcodes don't match
- Exit the equals method early if toString() values match
Closes gh-44857
1. Rename `TestConfiguration` to `TestJpaConfiguration` and remove unnecessary reference.
2. Use `withBean` instead of `withUserConfiguration` to avoid new configuration class.
3. Use kebab-case for configuration key
See gh-44800
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit updates DataSourceTransactionManagerAutoConfiguration to
explicitly states it should run after DataSourceAutoConfiguration.
Closes gh-44810