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

plumbing: TreeWalker performance improvement, bufio pool for objects #1125

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

saracen
Copy link
Contributor

@saracen saracen commented Apr 21, 2019

Removed path.Clean and path.Join, as they're expensive in comparison to basic string manipulation that can be used here.

Added bufio.Buffer pool to be used by tag, tree and commit objects.

@filipnavara
Copy link
Contributor

Are you reading my mind? Seriously, I just hit this performance bottleneck on my code for generating bloom filters :)

w.base = path.Join(w.base, entry.Name)
if obj != nil {
w.stack = append(w.stack, &treeEntryIter{obj, 0})
if len(w.base) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this code to a function instead of duplicate it?

Removes path.Clean and path.Join, as they're expensive in comparison to basic
string manipulation that can be used here.

Adds bufio.Buffer pool to be used by tag, tree and commit object decoding.

Signed-off-by: Arran Walker <[email protected]>
@mcuadros mcuadros merged commit 6d4408a into src-d:master Apr 22, 2019
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.

4 participants