-
Notifications
You must be signed in to change notification settings - Fork 125
Use packfile reader when is possible #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here's the benchmark: https://github.com/erizocosmico/packfile-read-benchmark The results of using the decoder is orders of magnitude faster. Note that this is without using cache, I tried reusing both instances of decoder and repository instead of opening one each run and they are slightly similar (except for the last). |
These are the result if we also open the repository in each iteration of the decoder benchmark:
As we can see, it's almost the same. |
Updated on the README the results of the benchmark after decoding the objects in the decoder benchmarks |
So, to be able to implement the usage of
|
Files table will not be indexable using this method. For the files you need to get the full path from the root directory, which can only be achieved traversing the whole tree from a commit. So, I see two options for this table:
I can't think right now of any possible downsides of implementing the second option other than having an implementation only for this table (and the increased size of the index). Just like with These would only require a few more things:
As we can see, those three tables basically require dumping them into an index for indexes to work with them. As a perk of this, there would be absolutely no call to the repository required because everything is already stored in the index. |
Progress:
UPDATE: This has changed a bit, since the implementation is not going to be the same as it was initially thought, so this checklist is outdated. |
Uh oh!
There was an error while loading. Please reload this page.
Maybe we can improve objects read performance accessing directly to the packfile.
To be able to do that, we need the offset of the file, that will be provided by the index.
First of all, we need to check the performance impact of that change on a big repository doing a quick benchmark, using directly
Repository
type and packfileDecoder
type, in the following cases:This benchmark should be done only using go-git, gitbase is not necessary.
If the results using Decoder directly are better than using
Repository
, we can continue and use Decoder directly in some cases.The text was updated successfully, but these errors were encountered: