HermitCrab analysis: defer the per-template clone in AnalysisAffixTemplateRule (1.054x wall-clock, not a step count)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- csharp
- Bereich
- performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- C#
- Sterne
- 29
- Forks
- 16
- Ø Merge
- 4 T. 11 Std.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sillsdev/machine
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
HermitCrab: one partial rule switches off the final-template prune for the whole grammar; Mbugwe chaanjiyɛ never finishesEvtl. vergeben @johnml1135 hat das heute übernommen. Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 1 Tag
-
Hermit Crab performance
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
Hermit Crab performance
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sillsdev/machine
Ähnliche Issues
-
bug emitter:client:csharp
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
microsoft/typespec#12572 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-area-label
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area-networking
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
dotnet/aspnetcore#70545 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag