You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce heap usage threshold from 100MB to 10MB in ConcurrentJarCreator
The previous threshold of 100000000 (100MB) divided by number of threads was causing
OutOfMemoryError issues when creating zip archives, particularly in environments with
limited heap space like CI systems. The ByteArrayOutputStream used internally can grow
up to 2x the threshold before switching to disk-based storage, leading to excessive
memory consumption.
Reducing to 10000000 (10MB) reduces memory pressure while still maintaining reasonable
performance. For typical builds with 4 threads, this means:
- Before: 25MB per stream (potentially 50MB+ with buffer doubling)
- After: 2.5MB per stream (potentially 5MB+ with buffer doubling)
This change addresses the heap space errors reported in apache/maven CI builds.
Co-authored-by: slachiewicz <[email protected]>
0 commit comments