perf(sidecar): raw-binary readFileSync transfer (skip base64)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, rust
調査の方向性
crates/execution/src/v8_runtime.rs:183、crates/execution/assets/v8-bridge.source.js、crates/v8-runtime/src/host_call.rs から始めて、既存のバイナリ応答パスを追跡します。ほかの {__agentOsType:"bytes"} コンシューマーを調査し、バイナリの同期読み取りと promise 読み取り、および writeFileBinary の対称性に対するカバレッジを追加します。完了条件は、バイナリ読み取りが base64 を使わずに raw-binary パスを使用することです。
索引モデルが issue の本文から書いたものです。
説明
Background
Guest binary fs.readFileSync(path) (no encoding) goes
_fs.readFileBinary → _fsReadFileBinary → mapped to fs.readFileSync with the
binary flag (crates/execution/src/v8_runtime.rs:183) → host returns the bytes as
a base64-encoded JSON object (javascript_sync_rpc_bytes_value:
{ "__agentOsType": "bytes", "base64": "..." }), and the guest decodes with
Buffer.from(base64, "base64") (crates/execution/assets/v8-bridge.source.js).
So every binary file read pays base64 encode (host) + decode (guest) plus ~33%
payload inflation. The base64 round-trip is wasted work.
Proposal
Transfer file bytes as raw binary instead of base64. The bridge response
protocol already has a raw-binary path (status = 2 / Uint8Array, see
crates/v8-runtime/src/host_call.rs). Route readFileSync's binary result through
that path and have the guest do Buffer.from(uint8array) directly.
Why it wasn't done in PR #77
The sync-RPC return type is a serde_json::Value, which can't carry raw bytes —
hence the base64 representation. Switching readFileSync to the status=2
raw-binary response is a cross-cutting protocol change that affects every
binary file read, so it was deferred rather than rushed (read was already 6.2×
faster from the pump fix in #77). Needs careful implementation + tests for:
binary readFile (sync + promises), writeFileBinary symmetry, and the
{__agentOsType:"bytes"} consumers elsewhere.
Expected impact
Removes base64 encode/decode + ~33% payload inflation per binary read; helps
read-heavy guests (bundlers, asset pipelines, large node_modules).
- 主要言語
- TypeScript
- スター
- 1k
- フォーク
- 53
- 平均マージ
- 2時間 54分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rivet-dev/dynamic-apps のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
rivet-dev/dynamic-apps#305 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
rivet-dev/dynamic-apps#306 ·
-
Build cache ignores maxResponseBytes, potentially reusing an outdated response limit対応中かも @Utkarshpandey0001 が 42 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
rivet-dev/dynamic-apps#297 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
rivet-dev/dynamic-apps#280 · コメント 2 件 ·
-
Make agentOS runtime classifier content-based (match Linux exec semantics), not extension-based対応中かも @mittal-parth が 47 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rivet-dev/dynamic-apps#275 ·
rivet-dev/dynamic-apps の issue をすべて見る
似ている issue
-
bug low priority
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
laaielichter/Godotwright#81 ·
メンテナーはふだん 1 日以内に返信
-
gebied: infra
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
VincentSmedinga/sc-heerenveen-fansite#538 ·
メンテナーはふだん 1 日以内に返信
-
CI grants a token it does not need, never cancels superseded runs, and cannot fail on lint warningsオープンgood first issue help wanted type:infrastructure type:security
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Open-Glassbeetle/glassbeetle#247 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信