Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format event with "warning" yellow and prefix with "Event: " (#31536)
It's useful to quickly see where new events are kicking off new rendering. This uses the new "warning" color (yellow) to do that. This is to help distinguish it from the purple (secondary color) which is used for the commit phase which is more of a follow up and it's often that you have several rerenders within one event which makes it hard to tell a part where it starts and event otherwise. For the span marking between previous render within the same event and the next setState, I use secondary-light (light purple) since it's kind of still part of the same sequence at that point. It's usually a spawned render (e.g. setState in useEffect or microtask) but it can also be sequential flushSync. I was bothered by that the event name is the only thing that's lower case so I prefixed it with `Event: ` like the JS traces are. <img width="1499" alt="Screenshot 2024-11-13 at 7 15 45 PM" src="https://github.com/user-attachments/assets/0c81c810-6b5d-4fc7-9bc0-d15b53844ade"> It might be a little confusing why our track starts earlier than the JS one below in the "Main Thread" flamegraph which looks the same. That's because ours is the start of the event time which is when the click happens where as the Main Thread one is when the JS event loop gets around to processing the event.
- Loading branch information