-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Improve event processing performance #153
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
Conversation
|
Test code: |
|
Remove the |
It does slow the runtime, but I'm only visualizing inside the |
1cdb989 to
8d9d871
Compare
| export const connect = async (socket, state, setResult, endpoint) => { | ||
| export const connect = async (socket, state, result, setResult, router, endpoint) => { | ||
| // Create the socket. | ||
| socket.current = new WebSocket(endpoint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we eventually change this so its on socket per app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure tbh, we will need to investigate this.
| Raises: | ||
| TypeError: If the given value is not a valid state. | ||
| """ | ||
| # Handle dicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice the reordering speed up


super().__getattribute__in functions in the critical path of event processing. It's ugly but it's faster.onopenfor web socket to hydrate the page on initial load.