posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix: replay timestamps

Open daibhin opened this issue 1 year ago • 1 comments

Problem

Closes https://github.com/PostHog/posthog/issues/21834 Addresses https://posthog.slack.com/archives/C03PB072FMJ/p1714032531933589

Changes

Switch button to use monospaced font to stop jumping


On top of the issue called out by the customer the inspector timestamps did not match the player toggle

Before After
Screenshot 2024-04-29 at 18 00 37 Screenshot 2024-04-29 at 18 04 04

Also fixes a performance issue given the TZLabel assumes that the timestamp is always changing which means unnecessary intervals being computed every second. And recomputes the timezone every second, for every timestamp on the page:

timer

Luckily for us the inspector is a virtualized list or the number of intervals would be much greater.

You can see the blips in CPU every second as these timers are processed (even when the recording is paused). Afterwards the CPU line looks flat.

Before After
Screenshot 2024-04-29 at 17 42 47 Screenshot 2024-04-29 at 18 06 08

(Fix for the TZLabel component coming in a future PR)

daibhin avatar Apr 29 '24 17:04 daibhin

Size Change: +524 B (0%)

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.05 MB +524 B (0%)

compressed-size-action

github-actions[bot] avatar Apr 29 '24 17:04 github-actions[bot]