Skip to content

Improve fragment search query checks - #754

Merged
YukiMatsuzawa merged 1 commit into
masterfrom
copilot/yukimatsuzawa-performance-improvements
Jul 30, 2026
Merged

Improve fragment search query checks#754
YukiMatsuzawa merged 1 commit into
masterfrom
copilot/yukimatsuzawa-performance-improvements

Conversation

@YukiMatsuzawa

Copy link
Copy Markdown
Contributor

This PR implements the highest-impact, lowest-effort performance fix identified in the MSDIAL5 scan: replace two redundant Count() scans with a single All() check in FragmentSearcher.

The repo scan also surfaced 9 additional performance improvement candidates for follow-up:

  1. MztabFormatExport.cs — replace .ToList()[0] with First(...).
  2. AlignmentSpotProperty.cs — cache MspBasedMatchResult lookup.
  3. AnalysisFileBeanModelCollection.cs — avoid Distinct().Count() uniqueness validation.
  4. DataAccess.cs — replace Count() == 0 / repeated scans with cheaper checks.
  5. PeakFilterViewModel.cs — cache repeated computed filter properties.
  6. AbundanceRatioCalculator.cs — reduce repeated matrix allocation.
  7. AlignmentSpotProperty.cs — cache AlignedPeakProperties task result access.
  8. SpectraGroupingModel.cs / AlignmentCSVExporter.cs — reduce LINQ chain overhead on large collections.
  9. DataAccess.cs — collapse multiple SWATH detection passes into a single scan.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@YukiMatsuzawa
YukiMatsuzawa merged commit 8792220 into master Jul 30, 2026
9 checks passed
@YukiMatsuzawa
YukiMatsuzawa deleted the copilot/yukimatsuzawa-performance-improvements branch July 30, 2026 03:41
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.

1 participant