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

[RFR] List perf improvements #3572

Merged
merged 9 commits into from
Aug 22, 2019
Merged

[RFR] List perf improvements #3572

merged 9 commits into from
Aug 22, 2019

Conversation

fzaninotto
Copy link
Member

Various list perf improvements following a profiling sessions.

After an initial render of the datagrid from store, avoids a rerendering of each datagrid row once an unchanged response comes from the dataprovider.

Also, I believe we'll have to support Component injection in some places to avoid forced renders due to the fact that elements are always different.

@fzaninotto fzaninotto added this to the 3.0.0 milestone Aug 22, 2019
@@ -107,7 +126,6 @@ const DatagridRow = ({
className={classes.expandIconCell}
>
<ExpandRowButton
className={classes.expandButton}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing the expand button to be always shown expanded (recent regression)

resource,
id: String(id),
})}
{isValidElement(expand)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a temporary API. I'm not sure yet whether we should support components and elements everywhere, we'll see if profiling forces us to do that often.

loaded: data.length !== 0 && !data.includes(undefined),
loading: ids.length !== 0,
loaded:
ids.length === 0 ||
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoids showing the loader if there is nothing to load

Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@djhi djhi merged commit ce1ad07 into next Aug 22, 2019
@djhi djhi deleted the list_perf_improvements branch August 22, 2019 14:54
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

Successfully merging this pull request may close these issues.

2 participants