Skip to content

Infinite forceRender #144

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

Closed
Katochimoto opened this issue Oct 28, 2019 · 7 comments
Closed

Infinite forceRender #144

Katochimoto opened this issue Oct 28, 2019 · 7 comments

Comments

@Katochimoto
Copy link

  1. getZone() =>
end: start + delta.keeps - 1
  1. filter() =>
if (delta.keeps > delta.total) {
   delta.end = delta.total - 1
}
  1. The condition is satisfied endlessly
    beforeUpdate() =>
delta.end !== zone.end

As a result, a memory leak and 100% CPU.

@tangbc
Copy link
Owner

tangbc commented Oct 29, 2019

Thank you I will check it.

@lroal
Copy link

lroal commented Nov 5, 2019

Any news on this one ?

@tangbc
Copy link
Owner

tangbc commented Nov 6, 2019

Any news on this one ?

Busy these days, I plan to check at weekends.

@tangbc
Copy link
Owner

tangbc commented Nov 6, 2019

@Katochimoto Has any way to case these endlessly calc? If delta.end doesn't match calc zone.end then will force match before forceRender:

// we'd better make sure forceRender calls as less as possible.
if (
  shouldRenderNextZone ||
  zone.start !== delta.start ||
  zone.end !== delta.end
) {
  delta.end = zone.end // force to equal value here
  delta.start = zone.start
  this.forceRender()
}

Function inside getZone not change delta.end.

@Katochimoto
Copy link
Author

Katochimoto commented Nov 7, 2019

Function inside getZone not change delta.end.

yes, and this is not the reason
you compare delta.end and zone.end, but delta has this condition

if (delta.keeps > delta.total) {
   delta.end = delta.total - 1
} 

this is a constant condition
and is not a general condition for both

this is my fix
Katochimoto@54db577#diff-1fdf421c05c1140f6d71444ea2b27638R344

@scarry1992
Copy link
Contributor

I have got same situation. Please, fix it.

@tangbc
Copy link
Owner

tangbc commented Feb 17, 2020

@scarry1992 new npm version 1.4.5 has published.

@tangbc tangbc closed this as completed Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants