Skip to content
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

Q: Meaning of highlight colors (green / orange)? #447

Open
rejhgadellaa opened this issue Dec 8, 2022 · 2 comments
Open

Q: Meaning of highlight colors (green / orange)? #447

rejhgadellaa opened this issue Dec 8, 2022 · 2 comments

Comments

@rejhgadellaa
Copy link

rejhgadellaa commented Dec 8, 2022

I'm wondering what the meaning of the highlight colors is when I have Highlight updates enabled. I'm seeing green/blue-ish and orange/yellow-ish outlines.

I would assume the difference is a component that (only) re-renders and one that is actually updated in the DOM?

@rejhgadellaa rejhgadellaa changed the title Q: Meaning of highlight colors (blue / orange)? Q: Meaning of highlight colors (green / orange)? Dec 8, 2022
@marvinhagemeister
Copy link
Member

The difference in color represents the frequency at which the components where updated. The more often a component was updated in a short amount of time, the more orange or reddish the highlight will appear.

@rejhgadellaa
Copy link
Author

Thanks for the quick reply!

I'm still a bit new to Preact and the VDOM. If I understand correctly, 'updated' means it's re-rendered (as in render() is called) but then Preact checks if there are any diffs between the resulting VDOM (sub)tree and only applies actual changes if there are any?

Is there a way to see/debug renders that do (and which do not) cause the DOM to update?

(I'm trying to optimize re-renders VS dom updates, that's why I'm asking :))

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants