Skip to content

Use mypyc to compile websocket reader - #13559

Draft
Dreamsorcerer wants to merge 14 commits into
masterfrom
mypyc
Draft

Use mypyc to compile websocket reader#13559
Dreamsorcerer wants to merge 14 commits into
masterfrom
mypyc

Conversation

@Dreamsorcerer

Copy link
Copy Markdown
Member

No description provided.

@codspeed-hq

codspeed-hq Bot commented Aug 27, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 30.25%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 95 untouched benchmarks
⏩ 83 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_read_one_hundred_masked_large_binary_websocket_messages 60.2 ms 86.2 ms -30.25%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing mypyc (b7a5c9e) with master (20acdf4)

Open in CodSpeed

Footnotes

  1. 83 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.85387% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.02%. Comparing base (20acdf4) to head (b7a5c9e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
aiohttp/_websocket/reader.py 98.73% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13559   +/-   ##
=======================================
  Coverage   99.02%   99.02%           
=======================================
  Files         135      136    +1     
  Lines       50500    50528   +28     
  Branches     2652     2652           
=======================================
+ Hits        50007    50035   +28     
  Misses        370      370           
  Partials      123      123           
Flag Coverage Δ
Autobahn 21.94% <5.44%> (-0.10%) ⬇️
CI-GHA 98.91% <98.56%> (+<0.01%) ⬆️
OS-Linux 98.69% <98.56%> (+<0.01%) ⬆️
OS-Windows 96.96% <7.44%> (-0.13%) ⬇️
OS-macOS 97.85% <7.44%> (-0.12%) ⬇️
Py-3.10 98.11% <98.56%> (+<0.01%) ⬆️
Py-3.11 98.35% <98.56%> (+<0.01%) ⬆️
Py-3.12 98.43% <98.56%> (+<0.01%) ⬆️
Py-3.13 98.42% <98.56%> (+0.02%) ⬆️
Py-3.14 98.45% <98.56%> (-0.01%) ⬇️
Py-3.14t 97.48% <7.44%> (-0.13%) ⬇️
Py-pypy-3.11 97.42% <98.56%> (+0.02%) ⬆️
VM-macos 97.85% <7.44%> (-0.12%) ⬇️
VM-ubuntu 98.69% <98.56%> (+<0.01%) ⬆️
VM-windows 96.96% <7.44%> (-0.13%) ⬇️
cython-coverage 81.89% <7.18%> (-1.19%) ⬇️

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

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

# cannot be relied on anywhere. Cost: the reader and its buffers
# are reclaimed by full GC passes, not refcounting. Never break
# this cycle manually; remove when the mypyc issue is resolved.
self._gc_cycle = self

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is resulting in GBs of memory use, while removing it is resulting in numerous segfaults. Do not merge until this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant