Skip to content
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

Closed
wants to merge 2 commits into from
Closed

PHOENIX-5382 : Improved performance with Bulk operations over iterations #530

wants to merge 2 commits into from

Conversation

virajjasani
Copy link
Contributor

No description provided.

@virajjasani
Copy link
Contributor Author

Please review @gjacoby126 @twdsilva

Copy link
Contributor

@ChinmaySKulkarni ChinmaySKulkarni left a 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());
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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());
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above.

Copy link
Contributor

@ChinmaySKulkarni ChinmaySKulkarni left a comment

Choose a reason for hiding this comment

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

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants