-
Notifications
You must be signed in to change notification settings - Fork 32
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
The bug that excessively occupies system memory seems to indicate a memory leak issue. #531
Comments
I seem to have found the root cause of the problem, which lies in the code of the lottie-web package. When using both the vue3-lottie and lottie-web libraries with SVG rendering and enabling loop looping and autoplay, the browser tab consumes around 200MB of system memory after page load, gradually increasing to 500-900MB or higher within 10 seconds. Sometimes, the browser's memory recycling mechanism doesn't work effectively, and even when it does, it only maintains around 400MB, or repeated refreshes cause memory overflow, leading to page lagging or crashing. <template>
<div>
<lottie-player ref="lottie" src="/image/lottie/4MMSzbLIE3.json" background="transparent" speed="2"
style="width: 300px; height: 300px" direction="1" mode="normal" loop autoplay></lottie-player>
<a-space>
<a-button type="primary" @click="lottie.play()">播放</a-button>
<a-button type="primary" @click="lottie.stop()">停止</a-button>
</a-space>
</div>
</template>
<script setup>
import "assets/js/lottie-player.js";
const lottie = ref(null);
const stop = () => {
lottie.value.stop();
};
</script>
<style lang="less"></style>
|
@kustone Please let me know with your results |
This issue is stale because it has been open for 30 days with no activity. |
I've also experienced the same issue with vue3-lottie on nuxt 3, with chrome crashing the page due to a memory leak. |
@alessiochiffi Do you have a copy of the website/lottie for this. Would be something worth looking into |
Unfortunately it's a private repo and we ended up removing the Lottie implementation from the site due to this issue. I will try to replicate and share it here as soon as I can |
This issue is stale because it has been open for 30 days with no activity. |
In the Windows/Nuxt3 v11 environment, I found that the vue3-lottie component renders using SVG, and when I enable autoplay and infinite looping, the memory usage within the tab spikes to 500-2000MB, significantly occupying system memory. This seems to indicate a memory leak issue. When I stop using the vue3-lottie component, the memory usage returns to normal. This problem was not present when using the Vue2 version previously.
The text was updated successfully, but these errors were encountered: