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

Replace calls to String.format() with concatenation #1293

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

fractalwrench
Copy link
Contributor

Goal

Replaces calls to String.format with concatenation. This was specifically found to be a problem in DeviceDataCollector which added ~1ms onto Bugsnag.start(), and profiling shows that using concatenation takes ~0.1ms instead.

As String.format isn't required in most cases throughout the codebase, it has been replaced with concatenation instead.

Testing

Relied on existing test coverage.

Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

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

LGTM - With some suggestions

@fractalwrench fractalwrench marked this pull request as ready for review June 24, 2021 16:06
@fractalwrench fractalwrench merged commit 923f1c2 into next Jun 25, 2021
@fractalwrench fractalwrench deleted the string-format-optimizations branch June 25, 2021 13:54
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