HermitCrab analysis: store folded equivalent analyses as differences, not whole Words (per-word memory)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
Read AnalysisStratumRule.cs around lines 162–171 and Word.cs around lines 80–94 and 467–513 to trace how alternatives are stored and expanded. The issue says to first measure how many bytes folded alternatives hold in C# on a heavy word; the proposed storage change is recorded for later and is not scheduled. Done means alternatives can be rebuilt from their differences while synthesis results remain exact.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
HermitCrab stores each folded equivalent analysis as a whole Word. When two analyses have the same merge key, AnalysisStratumRule.Apply does canonicalWord.Alternatives.Add(mruleOutWord) (AnalysisStratumRule.cs:167-171), keeping the full word: its own Shape, two feature structures, _allomorphs dictionary, _mruleApps list and non-head list, all copied in the Word(Word) constructor (Word.cs:80-94). What actually differs from the canonical is small: the morphological rule trail, the allomorph trail and the syntactic feature structure.
Recorded for later, not scheduled. Related to #593 and #595 (sharing the shape and feature structures inside each word); this one is about not keeping a full word per alternative at all.
No C# memory measurement exists for this mechanism. The numbers are PanGloss ones; the C# structure is the same (Word.Alternatives, Word.cs:467) and C# already rebuilds alternatives from a difference on demand in Word.ExpandAlternatives (Word.cs:472-513), which only applies trail and feature-structure changes on top of the source.
Idea: store a folded alternative as its differences (rule trail, allomorph trail, syntactic feature structure) and rebuild the Word when synthesis expands it. Keep the word whole whenever any other field differs, so results stay exact.
Reference implementation: sillsdev/PanGloss#250 (stacked on #249). Results are identical to before (status, signature, work steps on four grammars); the change is storage only.
Evidence (PanGloss, Rust)
Word mindeshi, Mbugwe, peak resident set, one thread. #250 on top of shape and feature-structure sharing: 50M cap 82 to 59 MB, 200M cap 389 to 267 MB, 1G cap 1,408 to 774 MB. At a 200M cap the search held 94,010 canonical words and 285,384 alternatives, three quarters of all words. An alternative was a 336-byte inline Word plus about 256 bytes of heap for trails and a map; in that search the alternatives differed from their canonical only by trail and syntactic features. Instructions did not regress (Swahili -3.48%, Cebuano -2.71%, Amharic +0.13%).
Notes and risks
- C# alternatives are created from
mruleOutWord, which is itself a clone-derived word, so #593 shrinks them but does not remove the per-alternative object, dictionary and lists. ExpandAlternativesreads the canonical at expansion time, and the canonical's syntactic feature structure is widened by later arrivals, so a delta must be rebuilt from the canonical at expansion, not fold, time.- The
Sourcechain (AnalysisStratumRule.cs:162) keeps earlier strata's words reachable from alternatives; a delta form must not breakExpandAlternatives. - Related: #512 (cull candidates at emission) attacks the same retained set from the other side.
Next: recorded for later, not scheduled. Measure how many bytes folded alternatives hold in C# on a heavy word before building anything.
- Ngôn ngữ chính
- C#
- Star
- 29
- Fork
- 16
- Merge trung bình
- 4 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sillsdev/machine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
HermitCrab: one partial rule switches off the final-template prune for the whole grammar; Mbugwe chaanjiyɛ never finishesCó thể đã có người làm @johnml1135 đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Hermit Crab performance
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Hermit Crab performance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 51/100
sillsdev/machine#635 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sillsdev/machine
Issue tương tự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-networking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dotnet/aspnetcore#70545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày