MLH-Fellowship / scheduling-profiler-prototype

Custom profiler prototype for React's concurrent mode
https://react-scheduling-profiler.vercel.app/
6 stars 0 forks source link

Possible bug in batch duration calculation: duration can be longer than the render that's observed in the timeline #124

Open taneliang opened 4 years ago

taneliang commented 4 years ago

From https://github.com/MLH-Fellowship/scheduling-profiler-prototype/pull/123:

I suspect there's a bug in our batch duration calculation, because the zoom to method often zooms to an empty space. This is not a bug in the zooming: the view is zoomed to a range that matches the batch duration displayed in the tooltip.

image

Perhaps caused by the lack of render cancelled marks (https://github.com/MLH-Fellowship/react/issues/30)?

Update 19 Aug

Seems like getBatchRange just sets the range's end time to the start time of the next batch. Is this intentional/correct?

https://github.com/MLH-Fellowship/scheduling-profiler-prototype/blob/95b2154770064c4908d817dac027ef94aed6bd00/src/utils/getBatchRange.js#L29-L35