performance
4 article(s) with this tag
-
29 Jul 2025
💊 #18: Optimising your code with WebFlux, p. 2 – the share method
The .share() method turns a cold Flux into a hot one: the source runs only once and concurrent subscribers receive the same stream.
-
21 Jul 2025
💊 #17: Optimising your code with WebFlux, p. 1 – the cache method
Flux's .cache() method stores the values emitted on the first subscription and reuses them for the following ones, avoiding recomputation on the source.
-
28 Oct 2024
💊 #7: Backpressure with WebFlux – the hookOnSubscribe and hookOnNext methods
How to control the flow of data between publisher and subscriber with BaseSubscriber, hookOnSubscribe and hookOnNext: batched requests to avoid overloads.
-
22 Aug 2024
💊 #2: Handling heterogeneous lists with the Stream API
Two approaches to extracting typed sub-lists from a List<Object>: a for loop with instanceof vs the Stream API with filter/map. Trade-offs in efficiency, readability and maintainability.