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 internal self._headers var in FileResponse #10107

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Dec 4, 2024

The prepare path called the public self.headers property which has to do a property lookup each time. As we are already
inside the object we can use self._headers instead. This change aligns web_fileresponse with web_response which uses self._headers and not self.headers. This change will not make a significant difference in performance but will make the profile a bit easier to read.

The prepare path called self.headers which has to do
a property lookup each time. As we are already
inside the object we can use self._headers instead
@bdraco bdraco added bot:chronographer:skip This PR does not need to include a change note backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Dec 4, 2024
@bdraco bdraco changed the title Use internal _headers property in FileResponse Use internal self._headers var in FileResponse Dec 4, 2024
Copy link

codspeed-hq bot commented Dec 4, 2024

CodSpeed Performance Report

Merging #10107 will not alter performance

Comparing file_response_headers (b3f9a6d) with master (678993a)

Summary

✅ 46 untouched benchmarks

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.75%. Comparing base (678993a) to head (b3f9a6d).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10107   +/-   ##
=======================================
  Coverage   98.75%   98.75%           
=======================================
  Files         122      122           
  Lines       36927    36927           
  Branches     4409     4409           
=======================================
  Hits        36469    36469           
  Misses        311      311           
  Partials      147      147           
Flag Coverage Δ
CI-GHA 98.64% <100.00%> (ø)
OS-Linux 98.33% <100.00%> (ø)
OS-Windows 96.17% <100.00%> (ø)
OS-macOS 97.43% <100.00%> (ø)
Py-3.10.11 97.28% <100.00%> (ø)
Py-3.10.15 97.87% <100.00%> (ø)
Py-3.11.10 97.85% <100.00%> (-0.06%) ⬇️
Py-3.11.9 97.32% <100.00%> (ø)
Py-3.12.7 98.38% <100.00%> (ø)
Py-3.13.0 97.19% <100.00%> (ø)
Py-3.13.1 98.35% <100.00%> (ø)
Py-3.9.13 97.20% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.77% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 97.34% <100.00%> (-0.01%) ⬇️
VM-macos 97.43% <100.00%> (ø)
VM-ubuntu 98.33% <100.00%> (ø)
VM-windows 96.17% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco marked this pull request as ready for review December 4, 2024 20:51
@bdraco bdraco requested a review from asvetlov as a code owner December 4, 2024 20:51
@bdraco bdraco merged commit 84bb77d into master Dec 4, 2024
43 checks passed
@bdraco bdraco deleted the file_response_headers branch December 4, 2024 20:51
Copy link
Contributor

patchback bot commented Dec 4, 2024

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/84bb77d14484c04561fabb7ad628aee903531955/pr-10107

Backported as #10108

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link
Contributor

patchback bot commented Dec 4, 2024

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/84bb77d14484c04561fabb7ad628aee903531955/pr-10107

Backported as #10109

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Dec 4, 2024
bdraco added a commit that referenced this pull request Dec 4, 2024
bdraco added a commit that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant