redfin / react-server

:rocket: Blazing fast page load and seamless navigation.
https://react-server.io/
Apache License 2.0
3.89k stars 184 forks source link

Improve displayElement to log the time it takes for the element to be displayed #169

Open TonyHYK opened 8 years ago

TonyHYK commented 8 years ago

Currently displayElement.fromStart timings are based on data-react-server-timing-offset set on the server side. In practice, the numbers we see are wildly different from the time at which content shows up on the page.

According to @gigabo , the "hack" was only necessary to log above the fold display times. We propose to kill displayElement times for individual elements above the fold, and log a more "accurate" time for displayAboveTheFold and elements after that.

gigabo commented 8 years ago

The data-react-server-timing-offset hack has bugged me from the beginning.

Unfortunately as far as I know there's really no other way for us to get display timings for elements above the fold. I'd say it's better to have accurate timings where we can than to have inaccurate timings everywhere.

drewpc commented 7 years ago

@gigabo I'm confused: was this issue addressed & merged in #168? Or is there more work to be done?

gigabo commented 7 years ago

It looks like #168 was just for displayAboveTheFold.fromStart, whereas this ticket is for improving all display timings.