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

[Merged by Bors] - Avoid temp allocations with slog #2183

Closed
wants to merge 1 commit into from

Conversation

paulhauner
Copy link
Member

Issue Addressed

Which issue # does this PR address?

Proposed Changes

Replaces use of format! in slog logging with it's special no-allocation ? and % shortcuts. According to a heaptrack analysis today over about a period of an hour, this will reduce temporary allocations by at least 4%.

Additional Info

NA

@paulhauner paulhauner added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! labels Feb 1, 2021
Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

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

LGTM

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-review The code is ready for review labels Feb 1, 2021
@paulhauner
Copy link
Member Author

Thanks Pawan!

bors r+

bors bot pushed a commit that referenced this pull request Feb 1, 2021
## Issue Addressed

Which issue # does this PR address?

## Proposed Changes

Replaces use of `format!` in `slog` logging with it's special no-allocation `?` and `%` shortcuts. According to a `heaptrack` analysis today over about a period of an hour, this will reduce temporary allocations by at least 4%.

## Additional Info

NA
@paulhauner
Copy link
Member Author

bors r+

@paulhauner paulhauner changed the base branch from stable to unstable February 4, 2021 05:49
@paulhauner
Copy link
Member Author

bors retry

@bors
Copy link

bors bot commented Feb 4, 2021

Already running a review

@paulhauner
Copy link
Member Author

bors cancel

@paulhauner
Copy link
Member Author

bors r-

@bors
Copy link

bors bot commented Feb 4, 2021

Canceled.

@paulhauner
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 4, 2021
## Issue Addressed

Which issue # does this PR address?

## Proposed Changes

Replaces use of `format!` in `slog` logging with it's special no-allocation `?` and `%` shortcuts. According to a `heaptrack` analysis today over about a period of an hour, this will reduce temporary allocations by at least 4%.

## Additional Info

NA
@bors
Copy link

bors bot commented Feb 4, 2021

Build failed:

@paulhauner
Copy link
Member Author

bors retry

bors bot pushed a commit that referenced this pull request Feb 4, 2021
## Issue Addressed

Which issue # does this PR address?

## Proposed Changes

Replaces use of `format!` in `slog` logging with it's special no-allocation `?` and `%` shortcuts. According to a `heaptrack` analysis today over about a period of an hour, this will reduce temporary allocations by at least 4%.

## Additional Info

NA
@bors bors bot changed the title Avoid temp allocations with slog [Merged by Bors] - Avoid temp allocations with slog Feb 4, 2021
@bors bors bot closed this Feb 4, 2021
@paulhauner paulhauner deleted the reduce-allocs branch February 15, 2021 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants