Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Feature/new packfile parser #898

Merged
merged 10 commits into from
Jul 26, 2018

Conversation

jfontan
Copy link
Contributor

@jfontan jfontan commented Jul 19, 2018

Needs #896

It needs tests and index writer is still not complete:

  • 64 bit offsets
  • Index checksum

Some improvements can be done changing the cache to hold byte slices and index by offset. We can also skip reading headers in resolveDeltas phase.

"gopkg.in/src-d/go-git.v4/utils/binary"
)

type object struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have Entry in this package with this exact same struct, maybe you can use that?

crc uint32
}

type objects []object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using the objects type for something specific (i don't see any methods for it)? If not, I'd say just go with []object (or []Entry)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm, saw the methods at the end of the file

@jfontan
Copy link
Contributor Author

jfontan commented Jul 20, 2018

Now it supports 64 bit offsets but needs more testing. Index checksum is already generated by the encoder.

@jfontan jfontan force-pushed the feature/new-packfile-parser branch from b2508e4 to 51b3671 Compare July 26, 2018 12:16
In one case it disables the cache and the other disables lookup when
the scanner is not seekable. Could be added back later.

Signed-off-by: Javi Fontan <[email protected]>
It's still not complete:

* 64 bit offsets
* IdxChecksum

Signed-off-by: Javi Fontan <[email protected]>
This functionality may be moved elsewhere in the future but is needed
now to fit filesystem.ObjectStorage and the new index.

Signed-off-by: Javi Fontan <[email protected]>
Index is also automatically generated when OnFooter is called.

Signed-off-by: Javi Fontan <[email protected]>
Now dotgit.PackWriter uses the new packfile.Parser and index.

Signed-off-by: Javi Fontan <[email protected]>
@jfontan jfontan force-pushed the feature/new-packfile-parser branch from 51b3671 to 79f2494 Compare July 26, 2018 12:18
@jfontan jfontan merged commit a08061a into src-d:perf/packfile-reads Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants