-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatching channels with multiple message types #90
Comments
I should also note I'm willing to PR / test something if you have any suggestions. I'm not comfortable in C, but am reasonably comfortable writing some Cython. |
Hi @limx0, if I understand correctly you're looking to dispatch the type of the message to one of several types based on the value of a |
No worries! Is the documentation clear enough? Is there a different place you looked for information like this? There might be a better way to organize the docs. |
I think the docs are clear now that they're been pointed out to me. Probably what I was looking for was something along the lines of "processing/handling multiple types in a stream" or something to that effect; |
Hi @jcrist
I'm using msgspec to decode some JSON from a channel that sends multiple message types, and am wondering how best to dispatch these messages to msgspec (please close if this is out of scope or you don't have any opinion).
I observe (roughly) the following times for a couple of methods I've tried, and they're pretty much ordered from fastest to most correct:
Obviously theres standard performance trade offs here; but I wonder if you've thought about handling this in msgspec or have any other more correct but also performant suggestions?
Thank you again for this wonderful library!
The text was updated successfully, but these errors were encountered: