Matching - Remove unnecessary enumerations #1276
Labels
matching-algorithm
Work relates to the algorithm which matches and scores donors for given patient HLA
performance-search
Covers changes to improve performance specifically *of search requests*.
Milestone
Example 1
Atlas/Atlas.MatchingAlgorithm/Services/Search/SearchService.cs
Line 80 in 358ca2e
.ToList()
will load all matches into memory, might be hundreds of 1000s of donors.DistinctBy()
being applied to scored results set?Example 2
Atlas/Atlas.MatchingAlgorithm/Services/Search/Matching/DonorMatchingService.cs
Line 126 in 4b91dea
Dictionary.ContainsKey
works as fast asHashSet.Contains
do. But taking into consideration batch size, it worth save 5Mb RAM and some CPU time spent on copying data just for fitting to typeHashSet<T>
The text was updated successfully, but these errors were encountered: