Repository navigation
fix(perf): count no-op keys the same way in both frontends - #83
Merged
Merged
Conversation
A key that changes nothing on screen (Backspace on an empty query) left its HYPRBURST_PERF sample pending on Rio until the next key's frame, so it read as one typing pause (110-760 ms). Native marked every keyed frame as changed and never folded keys this way. Both frontends now answer an input only with a visible change; native compares each frame's cells with the previous one while the probe is on. A pending input expires when the next key arrives more than 50 ms later and is printed as *-input-unanswered with its age. Bursts within 50 ms still fold into their first key. The rule is checked at the next key, not after one refresh with no damage: a Rio no-op key sends no PTY bytes, so there is no wake to time it out on.
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.
NUKE-114. On Rio, a key that changes nothing on screen (for example
Backspaceon an empty query) left itsHYPRBURST_PERFsample pending until the next key's frame. The sample then read as one typing pause, 110–760 ms. Native marked every keyed frame as changed, so it never folded keys this way.Changes
LastFrameinsrc/gpu/window.rs). The comparison runs only while the probe is on, so normal runs pay nothing.INPUT_EXPIRYinsrc/perf.rs). It is printed asquery-input-unanswered/selection-input-unanswered <frontend> <age>, and the new key starts its own sample. Bursts within 50 ms still fold into their first key.docs/hotpath-profiling.mddescribes the rule and the new metrics.docs/hotpath-findings.mdmarks finding 5 fixed and adds an "After NUKE-114" section. It also corrects the finding:Upon the first row wraps, so it isn't a no-op.Results
Live sessions in performance mode, typed manually:
c777c0a)Backspace×3 on an empty query,f,Backspace) gives the same result in both frontends: 3 unanswered lines plus 2 answered samples under 1 ms.Validation
cargo fmt --check.-D warnings, default features and--all-features.cargo build --all-targets.cargo test --all-targetswith default,hotpathandhotpath-allocfeatures: 341 / 342 / 342 passed.