René's URL Explorer Experiment


Title: asyncio_websockets tests the implementation of `zlib`, not of Python · Issue #460 · python/pyperformance · GitHub

Open Graph Title: asyncio_websockets tests the implementation of `zlib`, not of Python · Issue #460 · python/pyperformance

X Title: asyncio_websockets tests the implementation of `zlib`, not of Python · Issue #460 · python/pyperformance

Description: I found out that the asyncio_websockets benchmark spends ~87% of runtime in zlib (i.e. in the shared library libz.so), or whatever compression library is the default on the system-under-test. In other words, asyncio_websockets tests the ...

Open Graph Description: I found out that the asyncio_websockets benchmark spends ~87% of runtime in zlib (i.e. in the shared library libz.so), or whatever compression library is the default on the system-under-test. In ot...

X Description: I found out that the asyncio_websockets benchmark spends ~87% of runtime in zlib (i.e. in the shared library libz.so), or whatever compression library is the default on the system-under-test. In ot...

Opengraph URL: https://github.com/python/pyperformance/issues/460

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"asyncio_websockets tests the implementation of `zlib`, not of Python","articleBody":"I found out that the `asyncio_websockets` [benchmark](https://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py) spends ~87% of runtime in `zlib` (i.e. in the shared library `libz.so`), or whatever compression library is the default on the system-under-test.\n\nIn other words, `asyncio_websockets` tests the implementation of compression/decompression algorithms rather than anything to do with the Python interpreter or the `websockets` Python module. Websockets indeed enables compression by default: https://websockets.readthedocs.io/en/stable/topics/compression.html, excerpt from that official documentation:\n\u003e [connect()](https://websockets.readthedocs.io/en/stable/reference/asyncio/client.html#websockets.asyncio.client.connect) and [serve()](https://websockets.readthedocs.io/en/stable/reference/asyncio/server.html#websockets.asyncio.server.serve) enable compression by default because the reduction in network bandwidth is usually worth the additional memory and CPU cost.\n\n### Problem\n\nI believe this benchmark may not be measuring what's intended in its current form. For example, a replacement of `zlib` with `zlib-ng` or `zlib-rs` (which are newer drop-in replacement of `zlib`) may significantly affect the performance score of this benchmark, even though *nothing changed in Python and/or websockets implementations*. It is hard to root cause such performance modification, without knowing this detail about the `asyncio_websockets` benchmark.\n\nIt is also used in e.g. Phoronix testing, which may lead to unexpected conclusions for readers who aren't aware of this detail. Example: https://www.phoronix.com/review/cachyos-ubuntu-2510-f43/5.\n\n### Solutions\n\nI see the following solutions:\n1. Clearly document this behavior in https://pyperformance.readthedocs.io/benchmarks.html (in fact, there is no mention of websockets benchmark at all).\n2. Remove this benchmark, since the workload is dominated by native zlib rather than Python or websockets logic.\n3. Modify this benchmark to disable compression, as described here: https://websockets.readthedocs.io/en/stable/topics/compression.html#configuring-compression\n\nI'd lean towards option 3 (disabling compression) as it preserves the benchmark's intent while removing the zlib dependency from results. I'm happy to submit a PR if the maintainers agree.\n\n### Reproducing\n\nI ran it with a Amazon Linux 2023 docker container (OS distro similar to Fedora):\n```bash\ndocker run --rm -it amazonlinux:2023 /bin/bash # --\u003e\n\ndnf install -y pip perf dnf-utils\ndnf debuginfo-install zlib python3.9\npython3 -m pip install pyperformance\npython3 -m pip install websockets==11.0.3 pyperf==2.6.3\n\nperf record -g --call-graph dwarf -- \\\n  python3 -u /usr/local/lib/python3.9/site-packages/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py\n```\n\nAfter running the benchmark, we can examine the resulting `perf.data` file:\n```console\n$ perf report --hierarchy\n...\n-   99.93%        python3\n   -   87.22%        libz.so.1.2.11\n      +   40.11%        [.] inflate_fast\n      +   36.28%        [.] deflate_slow\n      ...\n   +    5.20%        libpython3.9.so.1.0\n   +    1.60%        libc.so.6\n   ...\n```\n\n---\n\nP.S. Thank you for maintaining the pyperformance project!","author":{"url":"https://github.com/dimakuv","@type":"Person","name":"dimakuv"},"datePublished":"2026-03-19T09:17:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/460/pyperformance/issues/460"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fa9ac3a6-45fb-33a3-4c9a-8d72e16e5e2e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id98AA:3D9B0D:1BCF5D0:285C45F:6A56554E
html-safe-nonce762a246cecfd96d635814afd996195b0d5bde2ac746f5c7916db429deb2f9994
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEFBOjNEOUIwRDoxQkNGNUQwOjI4NUM0NUY6NkE1NjU1NEUiLCJ2aXNpdG9yX2lkIjoiNjE4NjM0MjgwMTgzNzgwNjkyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac69973f9e62c770994865a08adc6d83b2be31ca289bd2f6c5ea9a113243bcec05
hovercard-subject-tagissue:4100381713
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/pyperformance/460/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f87dba1917c990d81c7251c6ed05de08a92ab6669988523a4afdfcba539c7a56/python/pyperformance/issues/460
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f87dba1917c990d81c7251c6ed05de08a92ab6669988523a4afdfcba539c7a56/python/pyperformance/issues/460
og:image:altI found out that the asyncio_websockets benchmark spends ~87% of runtime in zlib (i.e. in the shared library libz.so), or whatever compression library is the default on the system-under-test. In ot...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedimakuv
hostnamegithub.com
expected-hostnamegithub.com
Nonecffc1b7eb44a3dbb1e61c2a0523cad1f04e0368d730bf85ac498c992baf19e7d
turbo-cache-controlno-preview
go-importgithub.com/python/pyperformance git https://github.com/python/pyperformance.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id65949828
octolytics-dimension-repository_nwopython/pyperformance
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id65949828
octolytics-dimension-repository_network_root_nwopython/pyperformance
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release233d2274d9c68198aa6cb23d1db680b5c0b58bba
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/pyperformance/issues/460#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fpyperformance%2Fissues%2F460
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2Fpyperformance%2Fissues%2F460
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fpyperformance
Reloadhttps://github.com/python/pyperformance/issues/460
Reloadhttps://github.com/python/pyperformance/issues/460
Reloadhttps://github.com/python/pyperformance/issues/460
Please reload this pagehttps://github.com/python/pyperformance/issues/460
python https://github.com/python
pyperformancehttps://github.com/python/pyperformance
Please reload this pagehttps://github.com/python/pyperformance/issues/460
Notifications https://github.com/login?return_to=%2Fpython%2Fpyperformance
Fork 204 https://github.com/login?return_to=%2Fpython%2Fpyperformance
Star 1k https://github.com/login?return_to=%2Fpython%2Fpyperformance
Code https://github.com/python/pyperformance
Issues 49 https://github.com/python/pyperformance/issues
Pull requests 22 https://github.com/python/pyperformance/pulls
Actions https://github.com/python/pyperformance/actions
Projects https://github.com/python/pyperformance/projects
Security and quality 0 https://github.com/python/pyperformance/security
Insights https://github.com/python/pyperformance/pulse
Code https://github.com/python/pyperformance
Issues https://github.com/python/pyperformance/issues
Pull requests https://github.com/python/pyperformance/pulls
Actions https://github.com/python/pyperformance/actions
Projects https://github.com/python/pyperformance/projects
Security and quality https://github.com/python/pyperformance/security
Insights https://github.com/python/pyperformance/pulse
asyncio_websockets tests the implementation of zlib, not of Pythonhttps://github.com/python/pyperformance/issues/460#top
https://github.com/dimakuv
dimakuvhttps://github.com/dimakuv
on Mar 19, 2026https://github.com/python/pyperformance/issues/460#issue-4100381713
benchmarkhttps://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py
https://websockets.readthedocs.io/en/stable/topics/compression.htmlhttps://websockets.readthedocs.io/en/stable/topics/compression.html
connect()https://websockets.readthedocs.io/en/stable/reference/asyncio/client.html#websockets.asyncio.client.connect
serve()https://websockets.readthedocs.io/en/stable/reference/asyncio/server.html#websockets.asyncio.server.serve
https://www.phoronix.com/review/cachyos-ubuntu-2510-f43/5https://www.phoronix.com/review/cachyos-ubuntu-2510-f43/5
https://pyperformance.readthedocs.io/benchmarks.htmlhttps://pyperformance.readthedocs.io/benchmarks.html
https://websockets.readthedocs.io/en/stable/topics/compression.html#configuring-compressionhttps://websockets.readthedocs.io/en/stable/topics/compression.html#configuring-compression
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.