Repository navigation
Reduce native server memory and background work across platforms - #4
Merged
Merged
Conversation
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.
Large asset responses in the Windows/Linux server currently read the entire file and copy its requested slice. Four slow downloads of a 64 MiB stress asset retained about 393 MiB RSS in the debug relay. Streaming the requested bytes in bounded 64 KiB chunks reduced the measured peak to about 12.5 MiB on the same host, without changing HTTP headers or delivered bytes.
Also removes cancelled Android socket-watchdog tasks immediately, caches the desktop translation catalogue, forwards minimized/restored desktop visibility to the shared renderer, and suppresses duplicate macOS speech-state IPC. Socket timeouts, queue bounds, microphone/transcript quality, reconnect and ordinary visible-window behavior remain intact. No dependencies are added.
The lifecycle/resource audit and measurement limits are recorded in
docs/native-resource-audit.md.Validation:
script/build_and_run.sh --build.cargo check --lockedon macOS; the production Rust server harness builds and runs.tests/relay.mjspasses against the original and changed Rust relays: exact payloads, no echo, fragmented UTF-8, shared native session, HTTP cache/HEAD, asset bytes and supported Range forms.The repository CI supplies Windows, Linux x64/ARM64 and Android release/lint builds. Native minimize/restore and actual device battery use still need physical/VM checks; the memory sample is a debug process measurement with an intentionally oversized fixture, not a claim about every platform or normal font downloads.