HermitCrab feature structures: skip the clone map for frozen flat trees (no isolated measurement)

Aperta
#587 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp

Direzione di ricerca

Start with the linked optimization record and ledger to understand the archived branch’s status, then locate FeatureStruct.Clone and the FeatureStructCloneTests mentioned in the issue. Measure the change in isolation using allocations or dictionary operations avoided per clone, and keep the tests for aliases, cycles, reentrancy, and a tree embedded in a shared graph. Done means the measurement is recorded without claiming a speedup the data does not support.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hermit Crab performance

FeatureStruct.Clone builds an old-to-new copies map on every clone. A frozen structure marked as a flat tree has no aliases or cycles below its root, so a top-level clone cannot meet the same value twice and needs no map. The change skips the map in that case. Other clones borrow a per-thread map, clear it in finally, and use a fresh map when reentered. The internal recursive constructor always uses the caller's map. This is a per-thread pooled collection, not a cross-parse cache. The change is on the archived branch perf/hc-optimization-archive.

Measured. Nothing in isolation. It was timed only as part of the package, so the record makes no speed claim.

What a revival must do first. Measure it alone, in allocations or dictionary operations avoided per clone. Keep FeatureStructCloneTests (aliases, cycles, reentrancy, a tree embedded in a shared graph) with it.

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).

Lingua principale
C#
Stelle
29
Fork
16
Merge medio
4g 11h
PR unite (30g)
14

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sillsdev/machine

Tutte le issue di sillsdev/machine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.