René's URL Explorer Experiment


Title: bpo-41279: Add StreamReaderBufferedProtocol by tontinton · Pull Request #21446 · python/cpython · GitHub

Open Graph Title: bpo-41279: Add StreamReaderBufferedProtocol by tontinton · Pull Request #21446 · python/cpython

X Title: bpo-41279: Add StreamReaderBufferedProtocol by tontinton · Pull Request #21446 · python/cpython

Description: https://bugs.python.org/issue41279 I got way better performance on await reader.read() using this branch on linux (check out the chart on the server.py script's comments). The way I tested was writing a server / client: server.py: import asyncio import contextlib import time async def client_connected(reader, writer): start = time.time() with contextlib.closing(writer): for i in range(1000): # the more this parameter's distance from 65536 is greater the better the performance global_buffer gives # On linux: # 65536 * 2 -> Gives about 160% better performance # 4096 -> Gives about 155% better performance # 65536 -> Gives about 125% better performance # On windows using 65536 gives the same performance for some reason, which is interesting # But any other value gives a bit better performance, for example 65536 * 2 gives about 120% better performance await reader.read(65536 * 2) print(f'{time.time() - start}') async def main(): server = await asyncio.start_server(client_connected, '127.0.0.1', 8888, global_buffer=True) addr = server.sockets[0].getsockname() print(f'Serving on {addr}') async with server: await server.serve_forever() if __name__ == "__main__": asyncio.run(main()) client.py: import asyncio import contextlib async def flood(ip, port): message = b'A' * 1024 * 64 # tweak this parameter as much as you want reader, writer = await asyncio.open_connection(ip, port) with contextlib.closing(writer): while True: writer.write(message) await writer.drain() if __name__ == "__main__": asyncio.run(flood('127.0.0.1', 8888))

Open Graph Description: https://bugs.python.org/issue41279 I got way better performance on await reader.read() using this branch on linux (check out the chart on the server.py script's comments). The way I tested was...

X Description: https://bugs.python.org/issue41279 I got way better performance on await reader.read() using this branch on linux (check out the chart on the server.py script's comments). The way I tested...

Opengraph URL: https://github.com/python/cpython/pull/21446

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:581334d9-e339-79a9-63b0-0d5e91cf48ac
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDDA6:EA765:8CA642:C47DBC:696A5B3D
html-safe-nonce6a1a252b1cff8f84512033f7127e8d4f1d105d2aa4f2411905e695d8c12550f1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREE2OkVBNzY1OjhDQTY0MjpDNDdEQkM6Njk2QTVCM0QiLCJ2aXNpdG9yX2lkIjoiOTYzNDEyMDgzMDk4NjcxOTMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac851051609fb41b5161852affbde2b0751b96894678dd37654f35e69822f7f774
hovercard-subject-tagpull_request:447793681
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/21446/files
twitter:imagehttps://avatars.githubusercontent.com/u/19514176?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/19514176?s=400&v=4
og:image:althttps://bugs.python.org/issue41279 I got way better performance on await reader.read() using this branch on linux (check out the chart on the server.py script's comments). The way I tested was...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release63c426b30d262aba269ef14c40e3c817b384cd61
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/21446/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F21446%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F21446%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/21446/files
Reloadhttps://github.com/python/cpython/pull/21446/files
Reloadhttps://github.com/python/cpython/pull/21446/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
tontintonhttps://github.com/tontinton
python:mainhttps://github.com/python/cpython/tree/main
tontinton:fix-issue-41279https://github.com/tontinton/cpython/tree/fix-issue-41279
Conversation 57 https://github.com/python/cpython/pull/21446
Commits 6 https://github.com/python/cpython/pull/21446/commits
Checks 0 https://github.com/python/cpython/pull/21446/checks
Files changed https://github.com/python/cpython/pull/21446/files
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
bpo-41279: Add StreamReaderBufferedProtocol https://github.com/python/cpython/pull/21446/files#top
Show all changes 6 commits https://github.com/python/cpython/pull/21446/files
9a65cfe bpo-41279: Add StreamReaderBufferedProtocol (GH-21446) tontinton Jul 22, 2020 https://github.com/python/cpython/pull/21446/commits/9a65cfe2be0600a3a79391452338d567cdb07b69
6db642c bpo-41279: Add support for BufferedProtocol in _UnixReadPipeTransport… tontinton Jul 11, 2020 https://github.com/python/cpython/pull/21446/commits/6db642c749636f7e7e668d43fb46a9df4b734e49
71d6a90 bpo-41279: Add support for BufferedProtocol in _ProactorReadPipeTrans… tontinton Jul 14, 2020 https://github.com/python/cpython/pull/21446/commits/71d6a905dd6cb04c9729f21ceccde9ac2526b556
cdc14d8 bpo-41279: Support resetting a protocol in _ProactorReadPipeTransport… tontinton Jul 20, 2020 https://github.com/python/cpython/pull/21446/commits/cdc14d873e8d332585b8bdf7cea7201bad19a7fe
9e81f1a bpo-41279: Add BufferedProtocol to proactor transport tests (GH-21446) tontinton Jul 19, 2020 https://github.com/python/cpython/pull/21446/commits/9e81f1a660c6609b8c6494fc533d8b327894fd24
3dc4d18 bpo-41279: Add BufferedProtocol to unix read pipe transport tests (GH… tontinton Jul 19, 2020 https://github.com/python/cpython/pull/21446/commits/3dc4d183eb02ae819b91a7b53c00bf59fe08a78d
Clear filters https://github.com/python/cpython/pull/21446/files
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
proactor_events.py https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
streams.py https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
unix_events.py https://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
test_proactor_events.py https://github.com/python/cpython/pull/21446/files#diff-64f40794e7d328f5f5c7cf78bcc305c6f17ff02e5b9ebd1c78b6cbc5dc865187
test_unix_events.py https://github.com/python/cpython/pull/21446/files#diff-78695ed3f8e6b470fdf3701f14dd71a2ef5c039e21f398f043cd78c7dda6135c
utils.py https://github.com/python/cpython/pull/21446/files#diff-73a82d560b5e6a3b3abd58b460de2b09eaf53e3d1598a263a7b3a61d41068d34
2020-07-11-20-15-29.bpo-41279.M4OEou.rst https://github.com/python/cpython/pull/21446/files#diff-edf421208d09fd13bd2ad0449cee6089788403754224a3f56e13258742d55839
2020-07-11-20-16-56.bpo-41279.PYW8U8.rst https://github.com/python/cpython/pull/21446/files#diff-130de8a55ab68ccf49877ac50f2e3d9adcc3b327427cb7f4e226107ba8f88e31
2020-07-14-23-35-08.bpo-41279.Beuyjq.rst https://github.com/python/cpython/pull/21446/files#diff-89b9142798afc571492fa94cc2a8d1d1ec1c07c8bd3e1e6ce5e1c0dda34666f0
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L369
Lib/asyncio/proactor_events.pyhttps://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
View file https://github.com/python/cpython/blob/3dc4d183eb02ae819b91a7b53c00bf59fe08a78d/Lib/asyncio/proactor_events.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/21446/{{ revealButtonHref }}
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
1st1https://github.com/1st1
Jul 22, 2020https://github.com/python/cpython/pull/21446/files#r459047042
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
tontintonhttps://github.com/tontinton
Jul 22, 2020https://github.com/python/cpython/pull/21446/files#r459055357
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/pull/21446/files#diff-15176d64608861034db7168743f4f116f4cb33422cf685a2b911481c55826aa2
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L369
Lib/asyncio/streams.pyhttps://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
View file https://github.com/python/cpython/blob/3dc4d183eb02ae819b91a7b53c00bf59fe08a78d/Lib/asyncio/streams.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/21446/{{ revealButtonHref }}
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
asvetlovhttps://github.com/asvetlov
Aug 3, 2020https://github.com/python/cpython/pull/21446/files#r464438357
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
tontintonhttps://github.com/tontinton
Aug 3, 2020https://github.com/python/cpython/pull/21446/files#r464656093
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
asvetlovhttps://github.com/asvetlov
Aug 3, 2020https://github.com/python/cpython/pull/21446/files#r464673398
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
tontintonhttps://github.com/tontinton
Aug 4, 2020https://github.com/python/cpython/pull/21446/files#r465317538
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
asvetlovhttps://github.com/asvetlov
Aug 5, 2020https://github.com/python/cpython/pull/21446/files#r465996434
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
tontintonhttps://github.com/tontinton
Aug 5, 2020https://github.com/python/cpython/pull/21446/files#r466011644
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@1st1https://github.com/1st1
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
msoxzwhttps://github.com/msoxzw
Jan 28, 2023https://github.com/python/cpython/pull/21446/files#r1089832353
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
io.BufferedIOBasehttps://docs.python.org/3/library/io.html#io.BufferedIOBase
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
https://github.com/python/cpython/pull/21446/files#diff-986bdbc8d67d23185aefa287c95943fc9502363bcb89be876ab4626c5e94e3dc
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L369
Lib/asyncio/unix_events.pyhttps://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
View file https://github.com/python/cpython/blob/3dc4d183eb02ae819b91a7b53c00bf59fe08a78d/Lib/asyncio/unix_events.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/21446/{{ revealButtonHref }}
https://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
https://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
https://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
https://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
1st1https://github.com/1st1
Jul 19, 2020https://github.com/python/cpython/pull/21446/files#r456853337
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
tontintonhttps://github.com/tontinton
Jul 19, 2020https://github.com/python/cpython/pull/21446/files#r456954873
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
https://github.com/python/cpython/pull/21446/files#diff-59eb90ea71c294e306140c76e079c867bcd69a6faf7f96831ce7152eb6e37fc4
Please reload this pagehttps://github.com/python/cpython/pull/21446/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.