-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve siva index generation in ReadWriter
When using a ReadWriter the index in regenerated each time Index is called. These are the steps to generate one usable index: * Create new index merging index from file and current changes * Remove duplicates * Sort index by position Also, to find a file in the index it is walked until a match is found. This needs to be done each time a file has to be opened. For small number of files this is OK but when a repo has a lot or references the time spent here can be a lot. Now there's a new index type called OrderedIndex that stores the IndexEntries in lexicographic order. This allows to do binary searches for faster file location and also makes possible update the index instead of regenerating it each time. Signed-off-by: Javi Fontan <jfontan@gmail.com>
- Loading branch information
Showing
4 changed files
with
186 additions
and
5 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