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

Redundant re-rendering on initial load for some specs #1064

Open
saulshanabrook opened this issue Aug 4, 2021 · 1 comment
Open

Redundant re-rendering on initial load for some specs #1064

saulshanabrook opened this issue Aug 4, 2021 · 1 comment
Labels

Comments

@saulshanabrook
Copy link
Contributor

I noticed that for some charts, like the interactive_concat_layer Vega Lite example, on the initial load it re-renders the view unnecessarily.

The reason is that the componentDidUpdate for the renderer does a deep equality check and I noticed it is finding the previous vegaSpec different from the current one. However, the only difference between them is that some of the objects values are undefined, and the current library to do deep equality checking finds these as different (epoberezkin/fast-deep-equal#127). I assume that in this case, two vega specs are equal, even if some have keys map to undefined. If I serialize both specs to JSON, the JSON is equal.

@domoritz
Copy link
Member

domoritz commented Aug 5, 2021

Yes, I have seen this issue before but forgot to file an issue.

@domoritz domoritz added the bug label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants