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

fix too many unused render with HeaderComponent #15199

Closed
wants to merge 1 commit into from

Conversation

iwater
Copy link

@iwater iwater commented Jul 25, 2017

fix #14968 , this bug happen with SectionList with HeaderComponent

the distTop is wrong because the HeaderComponent Height > 0, cause distTop < 0 and hiPri = true, then call _updateCellsToRender > render again and again

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@@ -977,7 +977,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
const itemCount = this.props.getItemCount(this.props.data);
let hiPri = false;
if (first > 0 || last < itemCount - 1) {
const distTop = offset - this._getFrameMetricsApprox(first).offset;
const distTop = offset - (this._getFrameMetricsApprox(first).offset - this._getFrameMetricsApprox(0).offset);

Choose a reason for hiding this comment

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

prettier/prettier: Replace ·offset·-·(this._getFrameMetricsApprox(first).offset·- with ⏎········offset·-⏎········(this._getFrameMetricsApprox(first).offset·-⏎·········

@facebook-github-bot
Copy link
Contributor

@iwater I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project.

@stale
Copy link

stale bot commented Nov 27, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 27, 2017
@stale stale bot closed this Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issue with large data: Cells/Rows in the <SectionList/> loading slowly on Android
3 participants