This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Deduplicate Refs on the fly.
ClosedPublic

Authored by hokein on Mar 7 2019, 6:57 AM.

Details

Summary

Currently, we only do deduplication when we flush final results. We may
have huge duplications (refs from headers) during the indexing period (running
clangd-indexer on Chromium).

With this change, clangd-indexer can index the whole chromium projects
(48 threads, 40 GB peak memory usage).

Diff Detail

Event Timeline

hokein created this revision.Mar 7 2019, 6:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2019, 6:57 AM
kadircet accepted this revision.Mar 7 2019, 8:06 AM
kadircet added inline comments.
clangd/index/Ref.cpp
44

Can you add a comment saying that references will be ordered?

clangd/indexer/IndexerMain.cpp
59

instead of just deleting let's mention that it de-duplicates during insertion.

This revision is now accepted and ready to land.Mar 7 2019, 8:06 AM
hokein updated this revision to Diff 189825.Mar 8 2019, 1:19 AM
hokein marked 2 inline comments as done.

Add comments.

This revision was automatically updated to reflect the committed changes.