perf(speech): replace speak settings polling with listener#488
Closed
JustYannicc wants to merge 1 commit into
Closed
perf(speech): replace speak settings polling with listener#488JustYannicc wants to merge 1 commit into
JustYannicc wants to merge 1 commit into
Conversation
Collaborator
Author
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
settings-updatedpreload event.speakOptionssync behavior in a small tested helper.Before / After Evidence
getSettingscalls att=0, 2000, 4000, 6000ms, or 4 calls over a 6.5s idle window.getSettings()call on mount and no settings polling interval. While idle, additional settings reads are 0; live changes arrive throughonSettingsUpdated.getSettingscalls per minute per mounted speak manager, about 1,800 calls per hour in a long session.Validation
node scripts/test-speak-settings-listener.mjspassed.node --test 'scripts/test-*.mjs'passed: 28 passing, 1 skipped Electron-live test.node_modules/.bin/tsc -p tsconfig.main.jsonpassed.node_modules/.bin/vite buildpassed.useSpeakManager.tsandspeak-settings-sync.ts: no errors.node scripts/check-i18n.mjsexited 0; it reports two existing Italian missing keys unrelated to this change. No user-facing strings were added or changed.Notes
npmis intentionally disabled on this machine and its wrapper attempted a pnpm install that is blocked by pnpm's ignored-build policy, so validation used the underlying script commands directly fromnode_modules.