spring-framework/spring-webflux
James Yuzawa 800b13492b
Optimize some iterations in BodyExtractor and BodyInserter
This commit turns some stream-based iterations back into simpler
enhanced for loops.

For simple use cases like these, where the stream API is merely used to
map/filter + collect to a List, a for loop is more efficient.
This is especially true for small collections like the ones we deal
with in BodyInserters/BodyExtractors here (in the order of 50ns/op vs
5ns/op). These cases are also simple enough that they don't lose in
readability after the conversion.

Closes gh-30136
2023-03-22 11:04:54 +01:00
..
src Optimize some iterations in BodyExtractor and BodyInserter 2023-03-22 11:04:54 +01:00
spring-webflux.gradle Do not use Mockito to mock ReactiveAdapterRegistry 2023-01-17 15:44:57 +01:00