Skip to content
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

perf: batch gcode file metadata requests #1737

Merged
merged 1 commit into from
Jan 26, 2024
Merged

perf: batch gcode file metadata requests #1737

merged 1 commit into from
Jan 26, 2024

Conversation

nathanregner
Copy link
Contributor

Description

Batch server.files.metadata requests to Moonraker, resulting in fewer re-renders of the file table (once per batch, rather than once per file). The performance improvement is especially noticeable with lists of 100+ files.

Moonraker has supported JSON-RPC Batch Requests for at least 4 years, so I don't think backwards incompatibility is a concern.

An alternative approach could be to optimize the GCode Files table itself, which currently re-renders in its entirety when file metadata is updated. However, this approach felt more straightforward (and I'm not super familiar with Vue).

Related Tickets & Documents

Before

After

Mobile & Desktop Screenshots/Recordings

Before

before_480p.mov
before

After

after
after_720.mov

[optional] Are there any post-deployment tasks we need to perform?

this results in fewer re-renders of the table, significantly reducing
load time

Signed-off-by: Nathan Regner <nathanregner@gmail.com>
@meteyou meteyou added this to the vNext milestone Jan 9, 2024
@meteyou meteyou merged commit 65a62cb into mainsail-crew:develop Jan 26, 2024
8 checks passed
@meteyou
Copy link
Member

meteyou commented Jan 26, 2024

@nathanregner Thanks for this awesome PR. I don't know why I overlooked this function in Moonraker until now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants