Compression

Open
#199 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
networking

Research direction

Start by reading src/wsproto/extensions.py around its zlib usage and trace how compression is invoked through the sans-IO WebSocket flow. No test is named; determine the appropriate integration boundary for avoiding event-loop blocking without assuming thread sharing, and establish the maintainer-approved behavior and coverage needed for the issue to be done.

Written by the indexing model from the issue text.

Description

I see compression uses zlib. It seems to be one potential CPU-bound operation. In an async framework, one would run that in a thread to avoid blocking the event loop, but since wsproto is a sans-IO library, I don't know what to do. Running handlers in a thread in my async web framework is not an option because I need to access an object that cannot be shared between multiple threads.

Dominant language
Python
Stars
303
Forks
57
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-hyper/wsproto

All issues in python-hyper/wsproto

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.