You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is observed that this function is called every time the songs.value is set
the forEach will setTimeout on every el children, and doesn't clearTimeout, which will create thousands of thousands closure and callbacks, and leads to memory leak.
This replacement of array is common in vue design.
So, in theory, any update frequency less than 2s will cause the memory go insane eventually. In fact the intervals is never get clearInterval either, so that is another leak point.
In conclusion, auto-animate doesn't work with changing items (for a long runtime)
The text was updated successfully, but these errors were encountered:
Assume this template:
In javascript, this triggers every second.
It is observed that this function is called every time the songs.value is set
![image](https://private-user-images.githubusercontent.com/29846655/282246099-e4dde81e-47c3-4357-ac7c-783bc2703406.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjQ0MzgsIm5iZiI6MTcyNjEyNDEzOCwicGF0aCI6Ii8yOTg0NjY1NS8yODIyNDYwOTktZTRkZGU4MWUtNDdjMy00MzU3LWFjN2MtNzgzYmMyNzAzNDA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2NTUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0NmNlMjE4M2RkNGZmNjA3NGU0ZDVlN2Q2ZTE2NmNmOGUyMTMzMGEyOTJkZDY4MzBiNTc4MTc5MGViOGQyNzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Ag4Wu5h7fz3Simk-HQaCtefeJ9lwW4Ag0s_EdGE5-S0)
the
![image](https://private-user-images.githubusercontent.com/29846655/282246180-c57f8ec6-dc47-423e-9241-5267e67e24ac.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjQ0MzgsIm5iZiI6MTcyNjEyNDEzOCwicGF0aCI6Ii8yOTg0NjY1NS8yODIyNDYxODAtYzU3ZjhlYzYtZGM0Ny00MjNlLTkyNDEtNTI2N2U2N2UyNGFjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2NTUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhNTE3YjZmZGQ3ZGMzZjY3NWJmMzgyOWE2YTgwMDYwMThhNDA2MzgyODA1YzA2OTYwY2ZjZmRmYTBiYWVlYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZsdzUFZZYATBDA1IikfHs_p3QfYrEzG4FNfUcyk9WBE)
forEach
will setTimeout on everyel
children, and doesn't clearTimeout, which will create thousands of thousands closure and callbacks, and leads to memory leak.This replacement of array is common in vue design.
![image](https://private-user-images.githubusercontent.com/29846655/282246280-8307020e-a53a-4ed9-a402-88347cf33723.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjQ0MzgsIm5iZiI6MTcyNjEyNDEzOCwicGF0aCI6Ii8yOTg0NjY1NS8yODIyNDYyODAtODMwNzAyMGUtYTUzYS00ZWQ5LWE0MDItODgzNDdjZjMzNzIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2NTUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFiZDI2MTNiN2ZjMjIzOTA1MTdkYmZjY2EyYmQyOGIzYjk4NDhkMDA1MDU3ODZlMjMxZmQ2NWI3YWFlMjY0YTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LXj6uD39zRJtkuL77WI_YDIc8iQxelePE0rsGp_kWnc)
So, in theory, any update frequency less than 2s will cause the memory go insane eventually. In fact the
intervals
is never get clearInterval either, so that is another leak point.In conclusion, auto-animate doesn't work with changing items (for a long runtime)
The text was updated successfully, but these errors were encountered: