Skip to content

Conversation

@Vizonex
Copy link
Owner

@Vizonex Vizonex commented Jan 20, 2026

What do these changes do?

These changes make use of a new implementation that gets rid of needing to find the Context.run method and instead uses a C Implementation of it to speedup all Handles significantly. It may not seem like a great improvement but over the course of making and running many handles the time saved becomes significant. I have added a deeper explanation left in compat.h
if anybody wants to hear the nitty-gritty details.

Are there changes in behavior for the user?

  • faster handles Specifically ones that use contextvars so Handle and TimerHandle should see speed improvements now that the run method is no longer needed to be hunted down before calling upon a target function.

Is it a substantial burden for the maintainers to support this?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@Vizonex Vizonex merged commit 3b637f9 into main Jan 20, 2026
24 of 26 checks passed
@Vizonex Vizonex deleted the context-optimization branch January 20, 2026 18:22
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.

2 participants