Skip to content

1.4.2: take on an infinite source pulls lazily - #10

Merged
MarcelloDuarte merged 2 commits into
mainfrom
developing-1.4.2
Oct 15, 2026
Merged

MarcelloDuarte merged 2 commits into
mainfrom
developing-1.4.2

Conversation

@MarcelloDuarte

Copy link
Copy Markdown
Contributor

Fix

Stream(fromRange(1))->take(n) grew linearly with n (24.8 MB at 300k, 57 MB at 1M) because InfinitePull overrode take() to collect the n values into a ValuesPull before the lazy compile path ever ran. The override now appends the halting take transformation from 1.4.0, so the source is pulled one value at a time and stops after n; the Timer branch for awakeEvery is kept.

Spec: InfiniteTakeSpec checks the first five values, composition with a following map, and 300,000 values through evalTap and drain() under 8 MB.

Docs

Two guide links pointed at pages that do not exist (stream-operations.md, ../README.md).

@MarcelloDuarte
MarcelloDuarte merged commit 0496c58 into main Oct 15, 2026
12 checks passed
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.

1 participant