Compare a get per id with an or search in getMemories for small id lists

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript

調査の方向性

Read the getMemories(ids) implementation and the cost note in src/provenance.ts. Benchmark or searches against individual gets for 1, 10, 100, and 230 ids, including hits and misses. Done means the results establish whether gets win for small lists and, if so, the implementation uses a threshold while retaining searches for larger pages.

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

説明

getMemories(ids) (#46) reads ids with one or search per 100 ids, then restores input order with a Map. The repo's own note in src/provenance.ts says a search costs about 6 ms more than a get for a single id, and an in-process get per id may be cheaper for the small clusters a derived plugin re-reads.

Nothing measures or searches against gets for 1, 10, 100 and 230 ids. Benchmark both (hits and misses). If gets win for small lists, use them below a threshold and keep the search for larger pages.

Review-Deferral: a40a87232fbb15b8 severity=nit category=performance

主要言語
JavaScript
スター
0
フォーク
0
平均マージ
20時間 29分
マージ済み PR(30日)
28

環境構築

はじめの一歩

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

HarperFast/agent-memory のほかの issue

HarperFast/agent-memory の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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