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

Use immutable reference of service state. Update awc dns resolver. #1905

Merged
merged 9 commits into from
Feb 7, 2021

Conversation

fakeshadow
Copy link
Contributor

@fakeshadow fakeshadow commented Jan 14, 2021

PR Type

Refactor

PR Checklist

Check your PR fulfills the following:

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

In general actix-web does not need immutable service state.
This PR address changes from actix/actix-net#247 and actix/actix-net#248
It would reduce runtime borrow check by 2 for every service call, by 3 for tls service call, by 1 for every layer of middleware service call where call happens after call future polled.

@fakeshadow fakeshadow added A-awc project: awc A-files project: actix-files A-http project: actix-http A-web project: actix-web B-semver-major breaking change requiring a major version bump labels Jan 14, 2021
@robjtede robjtede marked this pull request as draft January 15, 2021 02:04
@fakeshadow fakeshadow changed the title Feat/immutable Use immutable reference of service state. Update awc dns resolver. Jan 23, 2021
@robjtede robjtede self-requested a review February 6, 2021 16:37
@fakeshadow fakeshadow marked this pull request as ready for review February 6, 2021 20:17
@robjtede robjtede merged commit 41bc04b into master Feb 7, 2021
@robjtede robjtede deleted the feat/immutable branch February 7, 2021 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-awc project: awc A-files project: actix-files A-http project: actix-http A-web project: actix-web B-semver-major breaking change requiring a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants