Cross-interpreter support for efficient sharing of frozendicts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
The concurrent.interpreters module for subinterpreters handles sharing/sending values across interpreters with direct sharing of some basic immutable types, and a fallback to pickling others. As an immutable container, tuples are supported (as long as all items are themselves shareable). Similarly, I think it would be good to support sharing frozendict without serialization (if keys & values are shareable).
Because dictionaries are so fundamental and common, having a better and more performant way to share such a mapping would significantly improve the experience of using concurrent.interpreters and InterpreterPoolExecutor.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the concurrent.interpreters documentation on sharing objects and the module's existing handling of shareable tuples and mappings. Determine how frozendict sharing could work when all keys and values are shareable; done means supported values cross interpreters without pickling and the behavior is covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100