Repository navigation
Optimize webhooks status subscriptions - #7428
Conversation
f44586e to
510f7a2
Compare
|
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
Determine the full set of printer objects to query and then query those objects in separate stages from client processing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
…do_query() There is no need for the self.pending_queries and self.clients member variables to have the same internal format. Process these requests in two separate stages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
…uery() In normal operation the amount of changed status information is likely to be small. It can be a little more efficient to calculate all the changes once and then share those changes with each client instead of recalculating the changes for each client. Reported by @jolting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
510f7a2 to
c8d9a79
Compare
This is an alternative implementation of #7412 .
In a nutshell, almost all status updates are small as very few fields typically change in the 250ms between updates, so it is slightly more efficient to calculate the full set of changes upfront instead of calculating the changes for each client.
This PR would be something I'd look to merge after the next release is tagged.
-Kevin