Avoid replaying the whole JS track cache for a latest-only subscriber

オープン
#10,265 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript

調査の方向性

Start with js/net/src/track.ts, especially Producer.#addSink and #mirror, then read the linked refresh benchmark at js/net/bench/refresh.ts. Compare eager replay with locating the live edge and materializing readers as ranges need them; sweep retained groups and subscriber counts, including the history widening, late or expired group, and historical subscriber cases. Verify delivered keys and drops against current behavior, and report refresh and first-readable-group timings.

索引モデルが issue の本文から書いたものです。

説明

In just js bench refresh, 32 readers joining one track took 6.1 ms to request a refresh with 64 historical groups retained and 78.0 ms with 1,024. With 1,024 retained groups, one joining reader took 2.44 ms. The previous Nightly measured 7.8 and 81.9 ms for the same 32-reader cases. This measures elapsed time from subscribing until the publisher observes the refresh across one in-memory lite-07 hop. First decoded frame and network RTT are outside the measurement. Benchmark · Nightly JS results, raw/refresh.csv · Previous Nightly

Producer.#addSink makes a full expiry pass and visits every cached group for each new subscriber. For each eligible entry, #mirror creates a reader, inserts it in the subscriber’s timeline and queue, and attaches a readability callback. The default live subscription asks for the latest group. A local operation count at the linked revision wrapped Group.Producer.prototype.mirror while subscribing to a track of completed, one-frame groups. At 8, 64 and 256 retained groups, eight default subscribers created 64, 512 and 2,048 mirrors synchronously. Every reader’s first group was the latest. The one-reader controls created exactly 8, 64 and 256 mirrors. Subscribe and replay · Group mirrors

Compare eager replay with locating the live edge in the shared track index and materializing other readers as their ranges need them. Sweep retained groups and joining readers independently. Include a reader that widens into history after joining, a late or expired group, and a historical subscriber as controls. Check delivered keys and drops against the current reader, then report time to refresh and time to the first readable group.

(Written by GPT-6.2 Astra with xhigh)

主要言語
Rust
スター
1.6k
フォーク
251
平均マージ
10時間 10分
マージ済み PR(30日)
832

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

moq-dev/moq のほかの issue

moq-dev/moq の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。