Conversation
9c68c30 to
3a7f7f9
Compare
Member
Author
|
Ref rrweb-io#1441 |
…sion (rrweb-io#1441) performance: remove a nested function call and an object clone during event emission - rename `event` to `eventWithoutTime`, but maintain backwards compatibility - `eventWithTime` (with time) could be renamed to `event` in a future version This is an extension of PR rrweb-io#1339 authored by: mydea <mydea@users.noreply.github.com>
3a7f7f9 to
5eef4f8
Compare
billyvg
commented
Apr 19, 2024
Comment on lines
-57
to
-62
| function wrapEvent(e: event): eventWithTime { | ||
| const eWithTime = e as eventWithTime; | ||
| eWithTime.timestamp = nowTimestamp(); | ||
| return eWithTime; | ||
| } | ||
|
|
Member
Author
There was a problem hiding this comment.
Added in #124, but removed in upstream PR which builds upon #124.
size-limit report 📦
|
mydea
reviewed
Apr 22, 2024
| type: EventType.IncrementalSnapshot, | ||
| data: { | ||
| source: IncrementalSource.CanvasMutation, | ||
| ...p, |
Member
There was a problem hiding this comment.
more a sidenote and unrelated to this PR, but I wonder if we could/should also make a change to all of these to avoid spreading these, and instead just set the source on the data 🤔 may help a little bit with memory usage, but not sure if worth it...
Member
Author
There was a problem hiding this comment.
We could run benchmark suite and see if there's anything noticable.
mydea
approved these changes
Apr 22, 2024
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.
performance: remove a nested function call and an object clone during event emission
eventtoeventWithoutTime, but maintain backwards compatibilityeventWithTime(with time) could be renamed toeventin a future versionThis is an extension of PR rrweb-io#1339 authored by: mydea mydea@users.noreply.github.com