Avoiding memory bloat with non-external runtimes
まだ誰も着手していません。
評価
調査の方向性
Start with the ExecJS.compile and compiled-context call API described in the issue, then trace how non-external runtimes manage their contexts. Define the release lifecycle and behavior after release, including whether memory is reclaimed by MiniRacer. The issue does not name implementation files or tests, so those must be located before work can be scoped.
索引モデルが issue の本文から書いたものです。
説明
I have observed that when using miniracer with our precompile assets process memory can run away big time.
This is cause sprockets often bloats the heap and at the point execjs is called there are extra v8 contexts sitting around in a bloated heap that just is too big to run a GC cause so much is free in it.
Trouble is a v8 context can easily consume 100+MB of RSS.
I was wondering if we could add to execjs a concept of "OK, I am done with the context"
Once that is called, MiniRacer could release the v8 context and reclaim all the memory. This means that usage wise if you want to reclaim memory early you would do:
context = ExecJS.compile(source)
context.call("CoffeeScript.compile", "square = (x) -> x * x", bare: true)
context.release
context.call("X") => raises error cause context is done and poison at this point.
Clearly implementation would be optional.
Thoughts ?
- 主要言語
- Ruby
- スター
- 581
- フォーク
- 285
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rails/execjs のほかの issue
-
Runtime stderr is missing from ruby error message対応中かも @arpitjain099 が 168 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
似ている issue
-
Bug Ruby Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-ruby#3228 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
開発用DockerイメージにPlaywrightのシステム依存を追加する対応中かも @momocus が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
sakazuki-org/sakazuki#1453 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
jenkins-infra/jenkins.io#9615 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信