Created-order listing reads a whole same-timestamp group per page
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- database, performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 20 h 29 min
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HarperFast/agent-memory
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
HarperFast/agent-memory#17 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
HarperFast/agent-memory#54 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
HarperFast/agent-memory#53 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
HarperFast/agent-memory#48 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
HarperFast/agent-memory#47 ·
Los mantenedores suelen responder en 1 día
Todos los issues de HarperFast/agent-memory
Issues similares
-
入群码过期Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
aliyun/ai-agent-handbook#29 · 1 comentario ·
-
docs documentation need-triage SaaS
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudstack#14719 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día