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
When using vue-i18n-next on components that are rendered under a v-once directive, I see that the memory usage does not go down after the components are not rendered anymore.
I think this was not the case on the previous version of vue2/vue-i18n-v8 because the beforeDestroy and destroyed hooks were called on components under v-once (see: https://codesandbox.io/s/lingering-water-j7g43). In vue3, this does not seem to be the case anymore (for the respective beforeUnmount and unmounted)
Expected behavior
I would like to be able to use v-once and vue-i18n-next with the memory footprint to decrease when these components are not rendered anymore
I noticed that this problem does not happen if vue-i18n is not loaded, or if the v-once is removed.
Maybe cleanup of the translation component needs to be done after rendering when in a v-once context? Or could this be a shortcoming of vue3?
Here is a small view of the memory given in Firefox, at first load, then after clicking on the "toggle" button 10 times and running explicitly the Garbage Collector, then ten more times and GC, and 10 more times and GC:
Thank you very much, and sorry for opening the issue here, and taking your time reviewing it. I think it took me a bit of time to realize that this was a broader issue with vue3 itself!
Since the issue I opened in the vue3 repository is label as being related to a bug on the vue side, I think it is safe to close this if you are OK with it also.
Reporting a bug?
When using
vue-i18n-next
on components that are rendered under av-once
directive, I see that the memory usage does not go down after the components are not rendered anymore.I think this was not the case on the previous version of vue2/vue-i18n-v8 because the
beforeDestroy
anddestroyed
hooks were called on components underv-once
(see: https://codesandbox.io/s/lingering-water-j7g43). In vue3, this does not seem to be the case anymore (for the respectivebeforeUnmount
andunmounted
)Expected behavior
I would like to be able to use v-once and vue-i18n-next with the memory footprint to decrease when these components are not rendered anymore
I noticed that this problem does not happen if
vue-i18n
is not loaded, or if thev-once
is removed.Maybe cleanup of the translation component needs to be done after rendering when in a
v-once
context? Or could this be a shortcoming of vue3?Reproduction
npm install
npm install -g serve
./node_modules/.bin/vue-cli-service build; serve -s dist -p 8081
about:memory
and click on "GC" in Firefox, or just open the console on the "memory" tab in Chrome and click on the "garbage can" button.about:memory
and click on "GC" in Firefox, or just open the console on the "memory" tab in Chrome and click on the "garbage can" button.System Info
Screenshot
Here is a small view of the memory given in Firefox, at first load, then after clicking on the "toggle" button 10 times and running explicitly the Garbage Collector, then ten more times and GC, and 10 more times and GC:
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: