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

Unclear the difference between displayAboveTheFold and renderAboveTheFold #849

Open lidawang opened 7 years ago

lidawang commented 7 years ago

We have stats tracking both displayAboveTheFold and renderAboveTheFold for the pages my team owns. From what I understand, the former tracks when the above the fold (designated by the code on the page aka where <TheFold/> element is) has finished being sent down the wire aka rendered by the browser, and the latter tracks when javascript has finished being hooked up to the above the fold, aka when React has hooked into the components. The naming of renderAboveTheFold is not super clear (it is right in that it's the React rendering that it's tracking, but is easily conflated with displayAboveTheFold). Could we consider renaming renderAboveTheFold? I understand that there's some implications to losing historical data with a stats name change, perhaps we could compromise by supporting both the former metric and its newly named version temporarily?

gigabo commented 7 years ago

@lidawang You've got it right. display => visible, render => interactive.

What names would your propose for these metrics? Keep in mind that the *AboveTheFold metrics themselves are part of a family that includes other display and render metrics on a per-RootElement basis. Those would also have to be renamed to keep everything consistent.

Is this something we could address with documentation?

dfabulich commented 7 years ago

interactiveAboveTheFold?

gigabo commented 7 years ago

interactiveAboveTheFold?

And interactiveElement (where previously there was renderElement)?

Makes sense. Most other metrics are verbs, but I don't think that's a rule. I don't even know how consistent we are with it. But generally metric names coming from React Server core slot well into the question "how long did it take to __?".

lidawang commented 7 years ago

Some documentation could address the issue for now (and probably wouldn't hurt after a rename). Does adding a blurb on https://react-server.io/docs/guides/understanding-rendering seem like the right place?

gigabo commented 7 years ago

Yeah, that might be an okay place. We might also want a "guide to timings" sort of document at some point. There are a lot of stats coming out of React Server but it's not always clear what they mean if you're not super familiar with the inner workings (this ticket is a case in point).