diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-21 14:52:28 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-22 11:23:54 +0000 |
| commit | 084b5c918c53c4e2eeb51664f3d403095f59f25d (patch) | |
| tree | 0b5bffd7ce76ebf64dea016a4caaada43e7c75f9 /pkg/codesearch/testdata/source2.c.json | |
| parent | 7355a8eb9f9228c3c3b5b6874e33968333115b23 (diff) | |
pkg/codesearch: reduce memory consumption when building index
With all references in the index, it become quite big.
Merge and dedup the resulting index on the fly.
Also intern all strings b/c there are tons of duplicates.
This also removes unnecessary duplicates (effectively ODR violations in the kernel)
due to use of BUILD_BUG_ON. The macro produces different function calls
in different translations units, so the same function may contain
__compiletime_assert_N1 call in one TU and __compiletime_assert_N2 in another.
Over this reduces resource consumption of index building from:
time:296.11s user:16993.71s sys:6661.03s memory:82707MB
to:
time:194.28s user:16860.01s sys:6647.01s memory: 3243MB
25x reduction in memory consumption.
Diffstat (limited to 'pkg/codesearch/testdata/source2.c.json')
0 files changed, 0 insertions, 0 deletions
