Skip to content

Conversation

michieldwitte
Copy link
Contributor

For every event a new TypeAdapter is created, which has a significant performance impact.
image
Creating it once and reusing it, makes event handling a lot faster.

Copy link
Collaborator

@rm-openai rm-openai left a comment

Choose a reason for hiding this comment

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

This is a great PR. Thanks. I think you might have to rebase. Btw could also make it a module level constant (lazy loaded) instead of once per-instance (but no pressure),

@rm-openai rm-openai enabled auto-merge (squash) August 22, 2025 19:02
@rm-openai rm-openai disabled auto-merge August 22, 2025 19:02
@rm-openai rm-openai merged commit 0a24671 into openai:main Aug 22, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:realtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants