codeintel: Additional worker memory improvements
Created by: efritz
This PR reorganizes some data structures to be a bit more memory-efficient. Most of these changes are mechanical.
- Collapse document data (which was a struct containing single field) into a string
- Collapse diagnostic result (which was a struct containing single field) into a list of diagnostics
- Move contains, moniker, and diagnostic relations out of documents/ranges and into a global map in the correlation state
- Create a more memory-efficient version of DefaultIDSetMap that optimizes singleton sets (of which there are multiple orders of magnitude more in proportion to other sized maps)
- Change the order in which result chunk are populated (by result chunk, not by random ordering of result identifiers)
- Change the order in which moniker locations are pouplated (remove need for string-hashing for uniqueness)
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #12108 into master will decrease coverage by
2.24%
. The diff coverage is90.40%
.@@ Coverage Diff @@ ## master #12108 +/- ## ========================================== - Coverage 50.14% 47.90% -2.25% ========================================== Files 1516 1412 -104 Lines 88579 80243 -8336 Branches 6664 6776 +112 ========================================== - Hits 44421 38443 -5978 + Misses 40214 38208 -2006 + Partials 3944 3592 -352
Flag Coverage Δ #go 52.10% <90.40%> (-2.46%)
#storybook 11.66% <ø> (ø)
#typescript 36.78% <ø> (ø)
#unit 47.41% <90.40%> (-2.29%)
Impacted Files Coverage Δ ...de-intel-worker/internal/correlation/lsif/types.go 0.00% <ø> (-100.00%)
...al/correlation/datastructures/default_idset_map.go 50.00% <27.27%> (-50.00%)
...ode-intel-worker/internal/correlation/correlate.go 54.62% <82.35%> (-9.58%)
...-intel-worker/internal/correlation/canonicalize.go 90.56% <91.30%> (-9.44%)
...se-code-intel-worker/internal/correlation/group.go 95.51% <95.41%> (+0.18%)
...ernal/correlation/datastructures/disjoint_idset.go 100.00% <100.00%> (ø)
...ntel-worker/internal/correlation/lsif/unmarshal.go 73.79% <100.00%> (-3.29%)
...se-code-intel-worker/internal/correlation/prune.go 88.88% <100.00%> (ø)
...se-code-intel-worker/internal/correlation/state.go 100.00% <100.00%> (ø)
...nal/codeintel/bundles/persistence/sqlite/writer.go 70.58% <100.00%> (ø)
... and 263 more Created by: codecov[bot]
Codecov Report
Merging #12108 into master will decrease coverage by
2.26%
. The diff coverage is75.17%
.@@ Coverage Diff @@ ## master #12108 +/- ## ========================================== - Coverage 50.14% 47.88% -2.27% ========================================== Files 1516 1412 -104 Lines 88579 80309 -8270 Branches 6664 6730 +66 ========================================== - Hits 44421 38456 -5965 + Misses 40214 38258 -1956 + Partials 3944 3595 -349
Flag Coverage Δ #go 52.07% <75.17%> (-2.50%)
#storybook 11.66% <ø> (ø)
#typescript 36.78% <ø> (ø)
#unit 47.38% <75.17%> (-2.31%)
Impacted Files Coverage Δ ...orker/internal/correlation/datastructures/idset.go 81.25% <0.00%> (-11.25%)
...de-intel-worker/internal/correlation/lsif/types.go 0.00% <ø> (-100.00%)
...al/correlation/datastructures/default_idset_map.go 32.50% <30.76%> (-67.50%)
...ernal/correlation/datastructures/disjoint_idset.go 73.68% <58.33%> (-26.32%)
...ode-intel-worker/internal/correlation/correlate.go 54.62% <84.21%> (-9.58%)
...-intel-worker/internal/correlation/canonicalize.go 90.65% <93.54%> (-9.35%)
...se-code-intel-worker/internal/correlation/group.go 95.39% <96.69%> (+0.06%)
...ntel-worker/internal/correlation/lsif/unmarshal.go 73.79% <100.00%> (-3.29%)
...se-code-intel-worker/internal/correlation/prune.go 88.88% <100.00%> (ø)
...se-code-intel-worker/internal/correlation/state.go 100.00% <100.00%> (ø)
... and 267 more
Please register or sign in to reply