-
Notifications
You must be signed in to change notification settings - Fork 2.9k
DetailsList's GroupSpacer: Refactor to React.SFC & remove styled HOC to improve render performance #8435
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
DetailsList's GroupSpacer: Refactor to React.SFC & remove styled HOC to improve render performance #8435
Conversation
|
@JasonGore may be interested in this perf as it relates to styled-HOC |
|
Puppeteer would be awesome. This is a great candidate for a test suite, especially with CPU throttling. |
packages/office-ui-fabric-react/src/components/GroupedList/GroupSpacer.types.ts
Show resolved
Hide resolved
Vitalius1
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 like the change. The only thing I am worried about is that we lost a simple way to fluentize this part in fluent-theme package through Customizer with the scope name (the width changes in fluent styles), but I think it's worth it as I don't need it for fabric-7 branch.
packages/office-ui-fabric-react/src/components/GroupedList/GroupSpacer.tsx
Outdated
Show resolved
Hide resolved
|
FWIW this customization hook for |
|
🎉 Handy links: |




Pull request checklist
$ npm run changeDescription of changes
We can render
GroupSpacerless and save row rendering time forDetailsList&GroupedList.Test Case
Rendering
DetailsList.Basic.Examplew/10,000rowsBefore Changes:
After Changes:
The only time the profiler reports time-spent in
GroupSpaceris eval'ing the modules:What is a GroupSpacer
This space (made blue for snapshot):
Backwards Compatibility
We lose the ability to theme this empty space, but I feel like the performance benefits are worth it.
I explored conditionally rendering the component to preserve backwards-compatibility in 580bb08.
Focus areas to test
DetailsListnon-grouped should render as expectedDetailsListgrouped should render with indentation as it does onmasterGroupedListshould render with indentation as it does onmasterMicrosoft Reviewers: Open in CodeFlow