Skip to content

LT-22780: Improve Hermit Crab performance - #1176

Merged
jtmaxwell3 merged 4 commits into
mainfrom
LT-22780
Oct 8, 2026
Merged

jtmaxwell3 merged 4 commits into
mainfrom
LT-22780

Conversation

@jtmaxwell3

@jtmaxwell3 jtmaxwell3 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

This implements https://jira.sil.org/browse/LT-22780. It includes three performance enhancements and some bug fixes that I found when writing the acceptance tests:

  • It adds a UI to MergeMSAs from add-UniqueStemMSAs.
  • It adds a UI to MakePartialsFinal from SIL.Machine 3.9.5.
  • It adds another performance enhancement from SIL.Machine 3.9.5 that doesn't require a UI.
  • It adds code to handle failure reasons in EndUnapplyTemplate (from MakePartialsFinal).
  • It changes DiffParserReport to include changed analyses if either of the parser reports had changed analyses.
  • It changes ParseAndUpdateWordform to include lowercase forms if they have an error message.
  • It changes SuppressableParseReport to suppress uppercase words if they don't have anything to report and the lowercase version is included in the parser report.

This change is Reviewable

@jtmaxwell3
jtmaxwell3 marked this pull request as draft October 6, 2026 16:59
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

NUnit Tests

    1 files  ±  0      1 suites  ±0   13m 30s ⏱️ -3s
6 599 tests +218  6 514 ✅ +218  85 💤 ±0  0 ❌ ±0 
6 608 runs  +218  6 523 ✅ +218  85 💤 ±0  0 ❌ ±0 

Results for commit 092b8fa. ± Comparison against base commit a6d34bd.

This pull request removes 6 and adds 224 tests. Note that renamed tests count towards both.
SIL.FieldWorks.XWorks.DetailComposerTests ‑ Compose_SenseWithReversalEntry_ComposesEditableReversalRow_NotUnsupported
SIL.FieldWorks.XWorks.DetailComposerTests ‑ ReversalPlugin_EditingAForm_StagesAndCommitsThroughTheEditContext
SIL.FieldWorks.XWorks.DetailObjectCommandExecutionTests ‑ ItemMenu_IsOwned_ForReferenceChoices_ButNotForEnvironments
SIL.FieldWorks.XWorks.DetailObjectCommandExecutionTests ‑ LabelMenu_IsFullyOwned_UnlessItCarriesTheWritingSystemsList
SIL.FieldWorks.XWorks.DetailObjectCommandExecutionTests ‑ OwnedMenu_WithAListSubmenu_IsRefused
SIL.FieldWorks.XWorks.DetailObjectCommandExecutionTests ‑ ReferenceItemMenu_NativeAuthority_RendersWhatTheColleaguePathRendered_ForEveryItem
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ AChangedRow_CommitsOnceWhenItLosesFocus
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ AClick_RestartsThePositionUpAndDownNavigateBy
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ AFailedSave_IsHeldOnce_ThenTheSlotShowsWhatIsSaved
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ AGroup_ShowsItsEntries_ThenOneAddRow_UnderOneLabel
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ AGroupsSlots_ShareOneLine_WithABarBetweenEachPair
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ ALoneAddSlot_HasNoBar
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ ALongEntry_StaysOnOneLine_InsideItsSlot
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ AModifiedArrow_RestartsThePositionUpAndDownNavigateBy
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ ARightToLeftGroup_FlowsRightToLeft
FwAvaloniaTests.Detail.FwReversalEntriesFieldTests ‑ ARunOfUpAndDown_KeepsTheHorizontalPositionItStartedFrom
…

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.51%. Comparing base (6b8a752) to head (092b8fa).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
Src/LexText/ParserCore/HCParser.cs 0.00% 10 Missing and 2 partials ⚠️
Src/LexText/ParserCore/FwXmlTraceManager.cs 0.00% 9 Missing and 2 partials ⚠️
...ynthByGloss/HCSynthByGlossLib/HcXmlTraceManager.cs 0.00% 9 Missing and 2 partials ⚠️
Src/LexText/ParserCore/ParserReport.cs 0.00% 0 Missing and 1 partial ⚠️
Src/LexText/ParserCore/ParserWorker.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1176      +/-   ##
==========================================
+ Coverage   39.30%   39.51%   +0.20%     
==========================================
  Files        1523     1537      +14     
  Lines      353117   354706    +1589     
  Branches    40761    41096     +335     
==========================================
+ Hits       138806   140159    +1353     
- Misses     185038   185154     +116     
- Partials    29273    29393     +120     
Files with missing lines Coverage Δ
Src/LexText/ParserCore/ParserReport.cs 67.61% <0.00%> (-0.28%) ⬇️
Src/LexText/ParserCore/ParserWorker.cs 64.07% <0.00%> (ø)
Src/LexText/ParserCore/FwXmlTraceManager.cs 0.00% <0.00%> (ø)
...ynthByGloss/HCSynthByGlossLib/HcXmlTraceManager.cs 0.17% <0.00%> (-0.01%) ⬇️
Src/LexText/ParserCore/HCParser.cs 0.19% <0.00%> (-0.01%) ⬇️

... and 59 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jtmaxwell3
jtmaxwell3 marked this pull request as ready for review October 7, 2026 15:21

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question inline.

This review was assisted by Claude Opus 5.5.

Comment thread Src/LexText/ParserCore/ParserWorker.cs Outdated
stopWatch.Stop();
lcResult.ParseTime = stopWatch.ElapsedMilliseconds;
if (lcResult.Analyses.Count > 0 && lcResult.ErrorMessage == null)
if (lcResult.Analyses.Count > 0 || !String.IsNullOrEmpty(lcResult.ErrorMessage))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filing a lowercase result that has only an error message now creates a lowercase wordform: ParseFiler.UpdateWordforms calls FindOrCreateWordform for it. Since this path runs for ordinary background parsing too, not just Check Parser, a capitalized word whose lowercase parse errors leaves a new lowercase wordform in the project holding only that error. Was that intended? If the error is only wanted for the parser report, checking checkParser here would keep it out of the project.

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonleenaylor reviewed 10 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on jtmaxwell3).

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that addresses it. LGTM.

This review was assisted by Claude Opus 5.5.

stopWatch.Stop();
lcResult.ParseTime = stopWatch.ElapsedMilliseconds;
if (lcResult.Analyses.Count > 0 && lcResult.ErrorMessage == null)
if (lcResult.Analyses.Count > 0 || (checkParser && !String.IsNullOrEmpty(lcResult.ErrorMessage)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under Check Parser, an error-only lowercase result still looks like it creates the lowercase wordform, because ParseFiler.UpdateWordforms calls FindOrCreateWordform before it checks CheckParserUpdatesAnalyses. So even a Check Parser run that is "just a test" can add one. I'm not sure if this is an issue for real world use or not so I'm just pointing it out for you to consider.

@jtmaxwell3
jtmaxwell3 merged commit bd0608d into main Oct 8, 2026
9 checks passed
@jtmaxwell3
jtmaxwell3 deleted the LT-22780 branch October 8, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants