Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[query] Implemented the Graphite
applyByNode
function #2654[query] Implemented the Graphite
applyByNode
function #2654Changes from 23 commits
e4e0185
744a685
a81a3af
04c878f
b269fed
a6cc182
122564b
17f0f0b
71567f2
081c11f
5b91c51
c57bd84
8a4d9cf
8095b6c
fdd37c1
ac0a7d9
5dc9b9e
6153026
40d8ffd
540bc13
97f4014
02ee52c
7c70f70
6913aa0
5adc578
6cb2739
b728e99
7c3eae0
59a29b1
34b60d6
da2d280
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: try to init with a size to avoid having go grow it automatically, since it does a silly doubling thing which can lead to a lot of allocs (each time capacity increases it allocs a new slice, copies, then frees the old one): https://play.golang.org/p/HaEISY70Ar8
e.g.
divided := make([][]string, 0, numChunks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; Can probably drop using
i
here, and just capture theprefix
itselfThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just deleted this line altogether. I don't know why I included it. I am not modifying
prefix
at all.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added within the lock since it's appending rather than inserting at an index. Probably better to lock the entire loop across values here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this look right?