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

Aberta
#587 1 comentário 0 reações 0 responsáveis Ver no GitHub

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
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
csharp
Domínio
performance, testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
C#
Estrelas
29
Forks
16
Merge médio
4d 11h
PRs com merge (30d)
14

Preparar o ambiente

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de sillsdev/machine

Todas as issues de sillsdev/machine

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.