Tagged articles
parallel-stream
22 articles · Page 1 of 1
A production outage caused by Java 8 parallel streams exposed the dangers of the default commonPool, unlimited task queuing, and long‑running API calls, leading to 100% CPU, 30+ GC events per hour, and a near‑service collapse, which was resolved by custom thread pools, timeouts, and CompletableFuture alternatives.
CompletableFutureForkJoinPoolJava
0 likes · 7 min read

The article explains how Java records, with their built‑in immutability and auto‑generated methods, eliminate mutable state, reduce lock contention, and improve throughput in high‑concurrency architectures, providing concrete code examples and comparisons with traditional mutable beans.
ConcurrencyConcurrentHashMapJava
0 likes · 9 min read

The article explains the core functions of Java’s Collectors, reveals their underlying implementation, and demonstrates how custom Collectors can handle complex aggregation scenarios—such as multi‑metric calculations, stateful reductions, and performance‑critical tasks—using a single‑pass, parallel‑compatible approach, while comparing against standard groupingBy compositions.
CollectorsJavaStream
0 likes · 10 min read

This article explores Java Stream's advanced capabilities, including multi‑level grouping and partitioning with Collectors, parallel stream performance tips, creation of infinite streams, stream concatenation and transformation, short‑circuit operations, primitive stream optimizations, and how to build custom collectors and streams, all illustrated with concrete code examples and step‑by‑step demonstrations.
CollectorsInfinite StreamJava
0 likes · 12 min read

This article introduces Java 8 Stream API, demonstrates filtering, mapping, sorting, collecting, and parallel streams with POJO examples, including code snippets, performance tips, and links to related resources, while also containing promotional messages for ChatGPT services.
JavaJava 8Stream API
0 likes · 11 min read

This article walks through Java Stream fundamentals, showing how to replace verbose loops with concise Stream pipelines, compares map and flatMap, explains intermediate and terminal operations such as filter, sorted, distinct, limit, peek, foreach, and collect, demonstrates parallel streams, highlights common pitfalls, and summarizes the advantages and disadvantages of using Stream APIs in everyday development.
CollectJavaStream API
0 likes · 21 min read

This article details how to dramatically speed up the import of massive Excel files (over 100,000 rows) into a Java backend by switching to EasyExcel, caching database lookups, using batch VALUES inserts, and parallelizing the write operations with functional utilities.
EasyExcelExcelJava
0 likes · 12 min read

This article explains how Java lambda expressions and the Stream API can replace verbose loops, comparators, and aggregation code with concise, readable functional constructs, covering traversal, sorting, aggregation, optional handling, thread creation, mapping, grouping, and parallel processing of collections.
JavaStream APIcollections
0 likes · 10 min read

This article explains Java's functional programming features—including Lambda expressions, method references, and the Stream API—by detailing their syntax, underlying mechanisms, and practical usage examples such as thread creation, data processing, and parallel streams.
Functional InterfaceJavaMethod Reference
0 likes · 21 min read

This article details a step‑by‑step optimization of a high‑volume Excel import workflow in Java, covering the migration from raw POI to EasyPOI and EasyExcel, caching database lookups, using MySQL batch inserts, and leveraging parallel streams to reduce import time from minutes to under two minutes.
EasyExcelExcelJava
0 likes · 12 min read

This article introduces Java 8's Stream API, explains its SQL‑like pipeline operations such as filter, map, sorted, collect and parallelStream, and demonstrates practical PO/VO processing with comprehensive code examples and performance considerations.
JavaStream APIdata processing
0 likes · 11 min read

This article explains Java 8 Stream fundamentals, compares intermediate and terminal operations, outlines its advantages over collections, and presents benchmark results showing when streams outperform iterator loops, especially with large data sets and parallel execution.
Java 8Java Streamiterator
0 likes · 12 min read

This article examines Java 8 Stream's data flow operations, compares its performance against traditional iterator loops across various tasks such as mapping, filtering, sorting, reduction, and string joining, and provides recommendations on when to use Stream, parallel Stream, or iterator based on data size and CPU cores.
JavaStream APIiterator
0 likes · 10 min read

This article introduces Java 8's Stream API, explains its intermediate and terminal operations, highlights its functional characteristics, compares its performance with traditional iterator loops through benchmark tests, and offers practical recommendations for using streams and parallel streams in backend development.
BackendBenchmarkJava
0 likes · 12 min read

This article explains Java 8 Stream fundamentals, compares its intermediate and terminal operations with traditional iterator loops through a series of benchmark tests (mapping, filtering, sorting, reduction, string joining, and mixed operations), analyzes results for different data sizes and CPU configurations, and provides practical guidance on when to use Stream, parallel Stream, or iterator in backend development.
BenchmarkJavaStream API
0 likes · 12 min read

This article explains three common ThreadLocal misuse traps—memory leaks caused by weak‑referenced keys, loss of thread‑local context in thread‑pool workers, and context disappearance in parallel streams—provides detailed code examples, and offers practical guidelines to prevent them in Java backend applications.
ConcurrencyJavaMemory Leak
0 likes · 9 min read

This article explains Java 8 Stream fundamentals, compares intermediate and terminal operations, outlines stream characteristics and advantages over collections, and presents detailed benchmark results comparing Stream, parallel Stream, and traditional iterator across various data‑processing tasks.
BenchmarkJavaStream API
0 likes · 13 min read

A production incident shows that using Java 8 parallel streams for message processing can dramatically reduce throughput, making them slower than a straightforward for‑loop due to the shared ForkJoinPool and thread‑pool sizing issues.
ConcurrencyForkJoinPoolJava
0 likes · 11 min read

This article details how to dramatically speed up the import of massive Excel files in a Java backend by switching to EasyExcel, caching database lookups, using batch inserts, and applying parallel streams while eliminating excessive logging.
EasyExcelExcelJava
0 likes · 11 min read

This article details a step-by-step optimization of a Java-based Excel import process, covering migration from POI to EasyExcel, caching database lookups, using batch inserts with VALUES, and leveraging parallel streams to dramatically reduce import time for massive datasets.
ExcelJavaMySQL
0 likes · 11 min read

This article analyzes Java 8 Stream API versus traditional iterator approaches across mapping, filtering, sorting, reduction, string concatenation and mixed operations, presenting benchmark results on various data sizes and offering practical recommendations for when to use streams, parallel streams, or iterators.
BenchmarkStream APIiterator
0 likes · 12 min read

This article explains how Java 8 Parallel Stream uses the common ForkJoinPool, why it may not improve performance for large proxy‑IP validation tasks, and demonstrates a custom ForkJoinPool solution that dramatically reduces execution time.
ConcurrencyForkJoinPoolJava
0 likes · 5 min read
