-
Notifications
You must be signed in to change notification settings - Fork 1
Profile scrollers #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Okay, I'm going to start off with some broad comments here. I may dive into the details, but I think some conceptual reorganizing is a first priority. First off, we should avoid creating a canvas that gets overlaid on another canvas. I'm not sure what optimizations we've made to limit what we actually have to draw with a big canvas, but my understanding is we basically have to process every pixel inside a canvas, at least when it comes to the compositor. It's not the end of the world, but if it's easy to avoid, we should. (And it is easy to avoid here.) So let's just use the main renderer, and add a rect for each overlay region that's partially filled: There's a few things introduced in the snippet above though that I should call out. The first is that I made a The second thing is I invoke a function here which doesn't exist: So, in order to compute our |
…s, no conversions. The markers have now been added to a canvas to the right of the main canvas. The two arrows (top and bottom ranges) scroll throughout the entire range. Refocus filters the data to the specified range. There are issues with the fact that we are overlaying a canvas. We need to include time conversions in order to go from absolute, relative, and screen locations. This is a WIP
5d569dd to
3ad53fa
Compare
… tool. After review feedback 1, I implemented time conversions, removed overlay canvas, and changed the implementation of the grey out selection rectanges. To mimic the behavior of the firefox profiler, the user will not be able to scroll or zoom once a range has been focused. They can use these features without a focused range, and the range markers will disappear. When a user focuses a range, additional timeline markers will indicate the top and bottom range numbers.
3ad53fa to
2527b85
Compare
squarewave
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't gone through everything yet, and I intend to go through more on (hopefully) Monday, but I will leave these comments here since I think there's a good chunk of things to be done addressing them.
One of the comments alluded to a bug I noticed, which I'll give STR for here:
- Open a procmon log in the viewer
- Refocus so the top is around, say, 5 seconds, and the bottom is around 10 seconds.
- Keep refocusing the top to somewhere between 5 and 6 seconds
- Notice that eventually, the top somehow actually refocuses past 6 seconds
| maxTimeRelative: absTimeToRelTime(maxTime), | ||
| }; | ||
|
|
||
| gOuterState.constrainedTimeBegin = minTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this outside of drawData calls. I think it would be preferable if this function does not modify gOuterState, and as much as possible restricts itself to thinking about only gState.
| } | ||
| } | ||
|
|
||
| function absTimeToRelTime(absTime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relative time, as the code has been informally treating it prior to this, was always relative to the minTime as defined by gState. If we use gOuterState here, then we're going to run into problems, and some of the bugs I'm running into feel like that's what's going on?
| let endRelative = entry.end - minTime; | ||
| let startPixels = (startRelative + rendererTranslate) * rendererScale; | ||
| let endPixels = (endRelative + rendererTranslate) * rendererScale; | ||
| let startRelative = absTimeToRelTime(entry.start); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example of the problem with absTimeToRelTime - we're subtracting constrainedRelative below to try to correct for the discrepancy, but we shouldn't need to do that. The renderer should be entirely in relative time, relative to gState.minTime, not gOuterState.minTime, because it shouldn't need to be aware of gOuterState. There are some leaky parts, like wanting to make sure that the timeline indicators and things like that use time relative to gOuterState, but I think that means we need another coordinate space, maybe "outer relative time" (absTimeToOuterRelTime). Is that making sense? (I could be wrong about this, but I think in the vast majority of cases things are simpler if we have relative time be relative to gState.minTime.)
No description provided.