HermitCrab analysis: defer the per-template clone in AnalysisAffixTemplateRule (1.054x wall-clock, not a step count)
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
- 45/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
- Área
- performance
Línea de trabajo
Start with the optimization record at docs/optimizations/deferred-template-clone.md and the disposition in docs/hermitcrab-perf-2026-09-disposition.md, then inspect AnalysisAffixTemplateRule.Apply and its emission points. First establish whether the target already clones lazily; measure steps or allocations and verify parity with a signature covering gloss, allomorph index, and syntactic feature structure. Done means the measured change is justified and parity holds.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
AnalysisAffixTemplateRule.Apply makes an internal engine clone of the input, freezes it once per template, and runs the slot DFS on the clone. The input is already frozen at every call site and slot rules never mutate it, so the DFS can run on the input directly. Only the two emission points that can pass the input through unchanged (ApplySlots terminal, ParallelApplySlots push) need a frozen clone. The traced path keeps the eager clone, because the trace manager stamps CurrentTrace onto the words it is given. The change is on the archived branch perf/hc-optimization-archive.
Measured. Clone-discard count (Amharic): 2,505 clones created, 1,659 discarded (66%). Wall-clock A/B on 45 Sena words, min of two interleaved rounds: 1.054x overall, 1.02x to 1.08x on heavy words. No step count was recorded. Parity was checked with WordAnalysisSignature, which on Sena compares morph counts only.
What a revival must do first. Re-measure in steps or allocations rather than wall time. Check parity with a gloss, allomorph-index and syntactic-feature-structure signature, not morph counts. The saving is allocation only, so a port that already clones lazily gains nothing.
Record: see the archived write-up below
Ledger: https://github.com/sillsdev/machine/pull/490#issuecomment-6701971116; disposition: https://github.com/sillsdev/machine/pull/490#issuecomment-6701971324
From #490 (closed).
- Lenguaje dominante
- C#
- Estrellas
- 29
- Forks
- 16
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin 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 sillsdev/machine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
HermitCrab: one partial rule switches off the final-template prune for the whole grammar; Mbugwe chaanjiyɛ never finishesPosiblemente ocupada @johnml1135 la tomó hoy. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Hermit Crab performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Hermit Crab performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de sillsdev/machine
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-networking
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/aspnetcore#70545 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día