-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: don't send IndexMetadata.LanguageMap (#221)
This mapping is purely internal from per-shard language IDs to language names and useless for RPCs, but the IndexMetadata type is shared between the on-disk format (as JSON) and the RPC format (with every request). With the recent go-enry change, there are far more languages in the mapping, and we noticed an unwanted increase in RAM usage. This is especially wasteful as the client never even looks at the field. Gob doesn't support tagging fields to mark them as non-exported, and a custom encoder is weird, so instead when a shard is read from disk and indexData is built, we set IndexMetadata.LanguageMap to nil. This addresses sourcegraph/sourcegraph#28799 Change-Id: Ief24dfc7e40cf3abdb7b557a1d2b6f3fad5ed61f
- Loading branch information
Ryan Hitchman
authored
Dec 9, 2021
1 parent
d86fb30
commit 5212eea
Showing
6 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters