Asset build: the build process's heap grows to 2 GB

Open
#3,422 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go, javascript, nodejs, python

Research direction

The growing heap is in the node process of the full asset build; the payload names no file paths. Start by running the build at SRO_BUILD_JOBS=2 with NODE_OPTIONS=--max-old-space-size=1024 under the per-second profiler, then check whether it finishes. If it fails, take a heap snapshot at the claim audit and inspect the publication ledger's claim set, the lane memo results and the outdoor pass's per-region records. Done means the full build finishes with node under 1 GB of heap and tools under 2.5 GB total.

Written by the indexing model from the issue text.

Description

area: client bug priority: critical

Part 2 of making the asset build finish on a 4 GB machine (part 1: #3421).

Observed. A per-second profile of the full asset build on 2026-11-14, at 15 jobs, shows the build's node process growing steadily: 98 MB at start, about 1.2 GB in the outdoor-world pass, and 2,017 MB at the claim audit, never falling back. Python peaked at about 800 MB in the later dungeon maps (fixed in #3421 by mapping Media.pk2).

Unknown, and it decides the fix. Either the build holds that much live data, or V8 is collecting lazily because its heap limit on a 16 GB machine is about 4 GB. On a 4 GB machine V8's limit is far lower, so in the first case the build fails with a heap out-of-memory error, and in the second it just runs more garbage collections.

Next steps.

  1. Run the full build at SRO_BUILD_JOBS=2 with NODE_OPTIONS=--max-old-space-size=1024 under the per-second profiler.
    • If it finishes: the growth was lazy collection. Set an explicit heap ceiling from the memory budget in the build entry and close this issue.
    • If it fails: take a heap snapshot at the claim audit and find the holder. The candidates are the publication ledger's claim set, the lane memo results kept for the whole run, and per-region records the outdoor pass keeps.
  2. Done when the full build finishes with node under 1 GB of heap and the tools under 2.5 GB in total.
Dominant language
Go
Stars
97
Forks
61
Avg merge
4h 14m
Merged PRs (30d)
913

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from opensro-dev/opensro

All issues in opensro-dev/opensro

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.