ref(replay): Move earliest timestamp tracking to eventBuffer#7983
Merged
ref(replay): Move earliest timestamp tracking to eventBuffer#7983
Conversation
mydea
commented
Apr 27, 2023
| const _context = { | ||
| initialTimestamp: this._context.initialTimestamp, | ||
| initialUrl: this._context.initialUrl, | ||
| errorIds: Array.from(this._context.errorIds).filter(Boolean), |
Member
Author
There was a problem hiding this comment.
Noticed these here, we actually check if the ids are non-empty before adding them to the set, so IMHO we do not need these checks anymore.
Contributor
size-limit report 📦
|
In preparation to allow us to handle this better for buffering sessions.
7774612 to
af01fbe
Compare
billyvg
approved these changes
Apr 28, 2023
Comment on lines
+52
to
+56
| const timestamp = timestampToMs(event.timestamp); | ||
| if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) { | ||
| this._earliestTimestamp = timestamp; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Why not do the same thing in array buffer?
Member
Author
There was a problem hiding this comment.
My thought was that we write this much more often than we read it (we really only read it on the first checkout), so felt it would be more efficient to do work only at read time then?
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.
In preparation to allow us to handle this better for buffering sessions. IMHO the event buffer should "know" about this, and we load it on-demand from there.
Extracted this out from #7025