Repository navigation
feat(computers): skip downloading a screen frame the view already shows - #494
Merged
Merged
Conversation
Contributor
|
🎉 This PR is included in version 0.65.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Every screen poll downloaded the whole frame, even when the computer's screen had not changed. The Computers grid polls each tile every 2 seconds and a driven screen every 300 ms, so most of that was the same picture again. Each poll now names the frame the view already shows, and a computer whose screen is still that frame answers "unchanged" instead of the image.
It needs a computer whose CLI has inference-gateway/cli#1797. An older one ignores the extra field and sends the full frame as before.
Changes
backend/src/workspaces.rs-screen_frametakeshave, the id of the frame on display, and adds it to theread_framerequest.Screencarries the frame'sid, and anunchangedreply answersNone, the same as "no new screen".frontend/components/ComputersView.tsx-useScreenremembers the id of the frame it shows and sends it with the next poll. A poll that answers nothing keeps the picture.frontend/lib/tauri.ts-ScreengainsidandscreenFrametakeshave.Testing
haveand for theunchangedreply. Thetake-overe2e test passes.unchangedyet, so the saving has not been observed end to end.Affected repos:
desktoponly. Docs follow-up: inference-gateway/docs#1179.