Created-order listing reads a whole same-timestamp group per page
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 38/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript
- Domínio
- database, performance
Direção de pesquisa
Start by tracing the GET /Memory/ created-order listing and its cursor handling for after=<createdAt>,<id>; the issue does not name the source file or tests. Reproduce the measured case with a large group of identical createdAt values and a page limit of 50, then check row reads across pages. Done means paging through a group no longer reads the entire group on each page while preserving the documented createdAt, then id ordering.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
GET /Memory/?order=created&after=<createdAt>,<id> sorts by createdAt, then id. Harper's index gives the createdAt order, then sorts each group of rows sharing one createdAt by id after reading the whole group. A page that lands inside such a group therefore reads all of it. Walking a group of T rows costs about T²/limit row reads.
Measured on Harper 5.3 (one node, local): a 2,000-row group cost 27 ms on its worst page at limit 50. Import gives one shared now to each batch of up to 100 rows sent without createdAt, so groups larger than that need source data with coarse or repeated timestamps.
Options if it matters: rely on the [value, primaryKey] order of Harper's secondary index and drop the id post-sort when the createdAt index drives the scan, or ask Harper core for a composite continuation (start a range scan at [t, id]).
Found in the pre-push review of the supersession backfill change (branch feat/supersession-backfill).
Review-Deferral: 65e3d9d0468f865d severity=nit category=performance
🤖 Generated by Anthropic Claude (Opus 5.5) via Claude Code; posted via @kriszyp.
- Linguagem predominante
- JavaScript
- Estrelas
- 0
- Forks
- 0
- Merge médio
- 20h 29min
- PRs com merge (30d)
- 28
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de HarperFast/agent-memory
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
HarperFast/agent-memory#17 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 18/100
HarperFast/agent-memory#54 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
HarperFast/agent-memory#53 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 52/100
HarperFast/agent-memory#48 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 65/100
HarperFast/agent-memory#47 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de HarperFast/agent-memory
Issues semelhantes
-
入群码过期Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
aliyun/ai-agent-handbook#29 · 1 comentário ·
-
docs documentation need-triage SaaS
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
apache/cloudstack#14719 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia