Skip to content

BigBuffer paging threshold, dependency updates, commit-ref pins#88

Open
OBrezhniev wants to merge 11 commits into
masterfrom
feature/sharedArrayBuffers
Open

BigBuffer paging threshold, dependency updates, commit-ref pins#88
OBrezhniev wants to merge 11 commits into
masterfrom
feature/sharedArrayBuffers

Conversation

@OBrezhniev

Copy link
Copy Markdown
Member

BigBuffer paging threshold, dependency updates, commit-ref pins

Summary

Companion to the snarkjs feature/memory-scoping PR (which pins this branch
by commit ref). Small net diff:

  • MAX_BUFFER_SIZE constant — the 1 GiB BigBuffer paging threshold in
    readSection is now a named constant with a comment (matched to
    BigBuffer's page size) instead of an inline literal.
  • devDependencies — rollup 2 → 4, eslint 8 → 10 (.eslintrc.cjs
    migrated to flat eslint.config.mjs); bundle rebuilt.
  • Dependency pinsfastfile and ffjavascript are pinned as
    git+https://…#<commit> refs so the manifest resolves standalone;
    local development uses uncommitted file:../ overrides. Lockfile
    regenerated against the pins (verified: npm ci works with SSH disabled —
    exact-SHA GitHub deps fetch via the HTTPS codeload tarball).

An unfinished readSectionToStream helper (referenced a never-declared
variable; no callers) was completed and parked on
feature/read-section-to-stream — intentionally not part of this PR.

Landing order

After the fastfile (feature/direct_rw_optimization) and ffjavascript
(feature/msm-signed-buckets) branches land; alternatively re-point the two
pins at published versions at merge time.

🤖 Generated with Claude Code

OBrezhniev and others added 11 commits September 11, 2025 00:57
… it and use max available buffer size to minimize amount of work downstream switching between them. Debug logs.
MAX_BUFFER_SIZE gated on `Buffer.constants.MAX_LENGTH`, but those constants live on
the `buffer` module, not the `Buffer` class, so the probe was always undefined and
fell back to `1 << 30`. Drop the dead check and set 1 GiB explicitly, matched to
BigBuffer's page size: sections at/above it are read into a paged BigBuffer instead
of one flat Uint8Array. No behaviour change (the runtime value was already 1 GiB).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migrates .eslintrc.cjs to flat eslint.config.mjs.
The committed manifest now resolves standalone (once the referenced
branches are pushed). For local development keep uncommitted file:../
overrides in the working tree; the lockfile still records the local
layout and gets regenerated after the branches are published.
console.time printed one line per section read into every consumer's output.
git+https installs anonymously (git+ssh needs SSH credentials).
@OBrezhniev

Copy link
Copy Markdown
Member Author

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