fix(replay): Fix debounce when maxWait == wait#7208
Merged
Conversation
Contributor
size-limit report 📦
|
Contributor
Replay SDK metrics 🚀
develop |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Revision | LCP | CLS | CPU | JS heap avg | JS heap max | netTx | netRx | netCount | netTime |
|---|---|---|---|---|---|---|---|---|---|
| 1cf8988 | +53.81 ms | -0.00 ms | +4.80 pp | +929.88 kB | +1.05 MB | +2.22 kB | +41 B | +1 | +91.07 ms |
| 68655e3 | +72.60 ms | +0.00 ms | +7.90 pp | +922.72 kB | +1.04 MB | +2.22 kB | +41 B | +1 | +109.40 ms |
| a8449de | +58.27 ms | -0.00 ms | +7.12 pp | +927.42 kB | +1.05 MB | +2.2 kB | +41 B | +1 | +98.31 ms |
| 79babe9 | +58.69 ms | -0.00 ms | +4.40 pp | +927.46 kB | +1.06 MB | +2.23 kB | +41 B | +1 | +103.20 ms |
| 5359ba9 | +55.62 ms | -0.00 ms | +4.29 pp | +935.26 kB | +1.05 MB | +2.2 kB | +41 B | +1 | +79.05 ms |
*) pp - percentage points - an absolute difference between two percentages.
Last updated: Thu, 16 Feb 2023 20:44:16 GMT
Last updated: Thu, 16 Feb 2023 20:44:16 GMT
mydea
reviewed
Feb 17, 2023
|
|
||
| if (maxWait && maxTimerId === undefined && maxWait !== wait) { | ||
| maxTimerId = setTimeout(invokeFunc, maxWait); | ||
| if (maxWait && maxTimerId === undefined) { |
Member
There was a problem hiding this comment.
Actually, invokeFunc already calls clearTimeout, so we can streamlime this slightly - IMHO we only need to remove the maxWait !== wait part, which was an incorrect "streamlining" that we added.
I'll adjust this and merge this and will actually release this fix today as well!
Update and fix tests for debounce when `maxWait` == `wait`.
48483f6 to
cb71021
Compare
mydea
approved these changes
Feb 17, 2023
Member
mydea
left a comment
There was a problem hiding this comment.
This is good! I'll leave the default max wait time at 5500 for now, we can then later think about reverting this back to 5000 - IMHO it's also OK to leave it at 5500, I guess.
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.
Update and fix tests for debounce when
maxWait==wait.