-
Notifications
You must be signed in to change notification settings - Fork 1k
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
PHOENIX-5382 : Improved performance with Bulk operations over iterations #530
Conversation
Please review @gjacoby126 @twdsilva |
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.
A few nits, otherwise lgtm. Thanks @virajjasani
for (StackTraceElement ste : exception.getStackTrace()) { | ||
frames.add(ste); | ||
} | ||
Collections.addAll(frames, exception.getStackTrace()); |
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: Collections.addAll
ultimately iterates over each element in the second arg. Can we do frames.addAll(Arrays.asList(exception.getStackTrace()));
instead?
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.
@ChinmaySKulkarni Thanks for PR review. Initially thought of doing this change but came across this: https://stackoverflow.com/questions/3343766/why-is-collections-addall-supposed-to-be-faster-than-c-addall
Please let me know if this looks good to you
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.
Makes sense. Thanks
for (StackTraceElement ste : exception.getStackTrace()) { | ||
frames.add(ste); | ||
} | ||
Collections.addAll(frames, exception.getStackTrace()); |
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.
Same comment as above.
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.
+1
No description provided.