-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up operations on BlobStoreIndexShardSnapshots (#88912)
This fixes a couple of slow points in `BlobStoreIndexShardSnapshots`, which become performance critical when working with large repositories. 1. Fix `physicalFiles` containing the same `FileInfo` instances repeatedly for every snapshot that holds the file. Without this fix the map can hold lists as long as the number of snapshots for the shard for files common to all snapshots of the shard. Also, only lazy build the map since it's only used during snapshotting and internalize the logic into `BlobStoreIndexShardSnapshots` so we don't have to bother with wrapping as unmodifiable. 2. Add efficient copy constructors for all 3 operations on the shard to avoid expensive looping over all snapshots and their files in many cases. 3. Use list instead of redundant map in deserialization, we weren't using the map for any deduplication anyways and are safe here thanks to Jackson's duplicate name detection
- Loading branch information
1 parent
be4d809
commit bd624ba
Showing
2 changed files
with
91 additions
and
76 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