sourcegraph/sourcegraph-public-snapshot
insights: refactor capture group methods for readability and performance
開放
#33,148 建立於 2022年3月28日
backendcode-insightsgood first issue
倉庫指標
- 星標
- (10,290 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
When a capture group insight is created, we tally up matches per capture group using MatchValues and Counts methods on ComputeMatchContext. We then group them in the method GroupByCaptureMatch.
The current logic uses many nested for loops. The aim of this ticket is to look into simplifying this logic. What we want at the end is a map of unique capture group values to their count.