Skip to content

fix(builder): size the binary storage queue from the max heap - #1586

Merged
rubenporras merged 1 commit into
dsldevkit:masterfrom
rubenporras:binary-storage-queue-heap
Oct 29, 2026
Merged

rubenporras merged 1 commit into
dsldevkit:masterfrom
rubenporras:binary-storage-queue-heap

Conversation

@rubenporras

Copy link
Copy Markdown
Member

Each queued binary storage task keeps its fully linked resource in memory until it is stored. With the fixed default capacity of 15,000, a slow database lets the queue grow until it fills the heap of a standalone full build and the build fails with an OutOfMemoryError.

Derive the default capacity from the maximum heap: one entry per 2 MB, at least 100 and at most 15,000 entries (2,304 for a 4.5 GB heap, the maximum from about 30 GB on). The system property
binaryStorageExecutor.queueCapacity still overrides it. Log the capacity with the high water mark.

Each queued binary storage task keeps its fully linked resource in
memory until it is stored. With the fixed default capacity of 15,000,
a slow database lets the queue grow until it fills the heap of a
standalone full build and the build fails with an OutOfMemoryError.

Derive the default capacity from the maximum heap: one entry per 2 MB,
at least 100 and at most 15,000 entries (2,304 for a 4.5 GB heap, the
maximum from about 30 GB on). The system property
binaryStorageExecutor.queueCapacity still overrides it. Log the
capacity with the high water mark.
@rubenporras
rubenporras added this pull request to the merge queue Oct 29, 2026
Merged via the queue into dsldevkit:master with commit 6bf2923 Oct 29, 2026
4 checks passed
@rubenporras
rubenporras deleted the binary-storage-queue-heap branch October 29, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants