Conversation
6292862 to
533d6fd
Compare
1cedsoda
added a commit
that referenced
this pull request
Jun 5, 2025
1cedsoda
added a commit
that referenced
this pull request
Jun 5, 2025
533d6fd to
be41a42
Compare
ce29f7e to
9179d09
Compare
1cedsoda
added a commit
that referenced
this pull request
Jun 6, 2025
9179d09 to
ff30a0b
Compare
1cedsoda
added a commit
that referenced
this pull request
Jun 6, 2025
ff30a0b to
d136032
Compare
1cedsoda
added a commit
that referenced
this pull request
Jun 15, 2025
1cedsoda
added a commit
that referenced
this pull request
Jun 15, 2025
0bb9d81 to
0df95dd
Compare
make socket queue faster
add init_socketio_queue
Emit events at 60FPS
71dfbfb to
2459d82
Compare
fbc4a73 to
727a87e
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves SocketIO performance by implementing a global event queue, removing blocking operations, and introducing MessagePack encoding while also optimizing state updates to 60 FPS via a throttled updater. Key changes include replacing immer’s produce with a custom ThrottledStoreUpdater, removing the useThrottle hook from several modules, and updating the namespace disconnection timeout.
Reviewed Changes
Copilot reviewed 49 out of 50 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| electron/src/machines/winder/winder2/winder2Namespace.ts | Replaces immer produce with a throttled updater for state changes |
| electron/src/machines/mock/mock1/* | Removes useThrottle logic and updates event handling to use throttled updater |
| electron/src/machines/laser/laser1/* | Applies similar state update changes and removes unneeded throttling |
| electron/src/machines/extruder/extruder2/* | Adopts the throttled updater for state changes, eliminating delayed throttling calls |
| electron/src/lib/useThrottle.ts | Entire file removed as throttling is now handled via ThrottledStoreUpdater |
| electron/src/client/socketioStore.ts | Introduces ThrottledStoreUpdater and MessagePack parser; updates namespace disconnect timeout |
| control-core/* | Removes per-socket queues in favor of a global event queue and converts event data to a boxed erased serializer |
Files not reviewed (1)
- electron/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
electron/src/client/socketioStore.ts:409
- The disconnect timeout log message was updated from 10s to 1h. Please update any accompanying documentation or inline comments to clearly explain this change so that future maintainers understand the rationale behind the increased inactivity timeout.
console.log(`Namespace ${namespace_path} disconnected after 1h of inactivity`);
Anatomik5
pushed a commit
that referenced
this pull request
Jun 20, 2025
Anatomik5
pushed a commit
that referenced
this pull request
Jun 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #357
socket-queueand not blocking theLoopThreadsetStatetriggered by events to 60fpsparsefunctionproducefor state updates triggered by events