Peak memory is 2× QuickJS: arena reservation, startup floor and representation
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- backend, performance
調査の方向性
Start by reviewing the heap reservation and collection logic, then measure the empty-script RSS floor and object-heavy benchmark cases named in the issue. The issue gives no file paths or test commands, so first locate the arena and startup allocation code and reproduce the reported measurements. Done means peak RSS is within 1.3× QuickJS across the 37 programs while runtime stays within 2% of today's.
索引モデルが issue の本文から書いたものです。
説明
Peak RSS of 0.3.0 is about twice QuickJS 2026-06-04's on the 37 fixed-work programs (median of 3, Ryzen 7 7840HS):
| Suite | Peak RSS, oxide / QuickJS |
|---|---|
| V8 v7 (8) | 2.09 |
| Octane 2.0 (15) | 1.83 |
| AWFY (14) | 2.19 |
| all 37 | 2.02 |
Time on the same programs is 1.03× QuickJS's, so the two together are the trade to improve. (CodeLoad, 9.6×, is a separate leak: #156.)
The collection threshold is not the cause
Halving --min-heap-mib from 4 (default) to 2, same binary, interleaved, 2 runs per program:
| Suite | time, 2 MiB / 4 MiB | peak RSS, 2 MiB / 4 MiB | RSS vs QuickJS at 2 MiB |
|---|---|---|---|
| V8 v7 | 1.006 | 0.979 | 2.04 |
| Octane | 0.985 | 0.958 | 1.75 |
| AWFY | 1.002 | 0.906 | 2.00 |
| all 37 | 0.996 | 0.942 | 1.90 |
Time does not change (largest: NBody +4%); memory drops only 6%.
Where it goes: AWFY Bounce
Live data is 215 KiB. QuickJS peaks at 4.4 MiB.
--min-heap-mib |
collections | heap reserved | peak RSS |
|---|---|---|---|
| 4 | 2 | 7,948 KiB | 12.4 MiB |
| 2 | 4 | 4,090 KiB | 10.3 MiB |
| 1 | 9 | 2,161 KiB | 9.1 MiB |
- Reserved is twice the threshold. At the 4 MiB threshold the heap reserves 7.9 MiB: object slots have 3.3× the capacity of the live count at the peak and value slots 3.3× (
--memory-report: objects 20,679 live of 68,725, values 107,607 of 358,320). The threshold counts used bytes; the arenas grow by more than that, and the free slots are split by size class. - About 7 MiB outside the heap even at a 1 MiB threshold: the empty-script floor is 5.1 MiB against QuickJS's 3.3 MiB (binary pages touched, the realm's builtins, atoms), plus compiler allocations (the stack-code intermediate of #154) that malloc keeps.
- Object representation in object-heavy programs: Splay 264.6 vs 144.0 MiB, Earley-Boyer 24.9 vs 14.6 MiB.
Direction
- Count reserved bytes, not used bytes, toward the threshold, and grow arenas in steps bounded by it; return empty arena chunks after a collection.
- Measure and cut the startup floor (lazy builtins, atom table sizing).
- Release compile-time allocations (follows from #154).
Acceptance: peak RSS within 1.3× of QuickJS over the 37 programs (geometric mean) with time within 2% of today's.
- 主要言語
- Rust
- スター
- 61
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pocket-stack/quickjs-oxide のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 44/100
pocket-stack/quickjs-oxide#192 · コメント 3 件 ·
-
performance.now() bypasses Host and uses std::time::Instant (unsupported on wasm32-unknown-unknown)オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
pocket-stack/quickjs-oxide#165 · コメント 1 件 ·
-
Two public SystemHost types: the core one is always UTC, the host crate's uses the system time zoneオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
pocket-stack/quickjs-oxide#164 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
pocket-stack/quickjs-oxide#163 ·
-
Execution slow paths: inline-cache misses (Gameboy), typed-array access (zlib), array stores (Sieve)オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
pocket-stack/quickjs-oxide#157 ·
pocket-stack/quickjs-oxide の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Wait for the IDS correction dialog to settle in the stale-audit test対応中かも @louistrue が今日担当しました。 オープンready
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
dutchman-cad/dutchman#874 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue ready
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MartinPTielemans/ilo#3840 ·
メンテナーはふだん 1 日以内に返信
-
bug file-compat priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
storytold/wordcraft#7248 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信