Closed noru closed 6 years ago
This seems to be happening for me as well if the screen becomes black or maybe also if I keep the browser on a different desktop than the one I'm viewing. As can be seen here in the screenshot the internal children array is not cleared.
I believe that this happen if the animation is not run (which I guess Chrome might choose to do in the above circumstances).
A theoretical fix:
Thanks for the report! I was aware of increased memory consumption but thought it only occurred when items were swapped really quickly / interrupted.
I think the root cause of the issue is that I'm using ontransitionend
event-handler, and it's been unreliable. Entirely possible I'm mistaken and it's a silly mistake on our part, but that's been my experience.
One possible solution, similar to @pajn's suggestion, is to set an interval (maybe 5 minutes?) that compares the children in state to the children in props, and removes any extraneous ones. Some care would have to be taken to ensure that it doesn't do this during an animation, otherwise an exiting node may suddenly disappear.
But yeah, I suspect this issue will take care of itself when we move to the Web Animations API. Just waiting for it to have non-terrible browser support, or a smaller polyfill :/
Closing this as a wontfix
, as I don't foresee time to look into this, and it doesn't appear to be a widely-experienced issue
I had this problem running my page on an android device: after a while the browser would just crash or kill by android.
After some profiling I found this:
disableAllAnimations={true}
(and I've read the 'Known Issue' part)My app, unlike most web pages, supposes to be running on a memory stringent device for a relatively long period. I think it can be easily reproduced by rendering a list real fast over and over.
Lastly, it's probably not an issue in most cases and I could manage to pull out a work around. Just hope this info would help others.
Thanks for this cool component!