Skip to content
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

Possible memory leak #394

Closed
peluprvi opened this issue Jul 17, 2018 · 9 comments
Closed

Possible memory leak #394

peluprvi opened this issue Jul 17, 2018 · 9 comments

Comments

@peluprvi
Copy link

peluprvi commented Jul 17, 2018

vue & vue-i18n version

vue 2.5.16
vue-i18n 8.0.0

Reproduction Link

With vue-i18n https://codepen.io/anon/pen/ajZwZg
Without vue-i18n https://codepen.io/anon/pen/gjMgzG

Steps to reproduce

  • Open the codepen https://codepen.io/anon/pen/gjMgzG
  • Click a couple of times to list 0 item, then 1000
  • See the memory increasing
  • Try force GC (trash icon) before measure it
  • Take heap snapshots in Chrome "Memory" tab
  • Watch the memory usage in the Chome task manager (shift esc)
  • Watch the memory usage in OS task manager

What is Expected?

Same memory usage after garbage collector

What is actually happening?

Despite the "Performance" tab displays the same memory usage, the "Memory" heap snapshot displays a memory increase.
Also, the both Chrome and OS task managers show the memory only increasing.


It get worse when:

  • Using Vuei18n (even without translating)
  • Having big children components

Tested on:

  • Windows 7 64 Bits
  • Chrome 67.0.3396.99 64 bits

Please, consider that:

  • I may be doing something wrong
  • It can be a Chrome issue
  • It can be an OS issue

I also create an issue in vuejs/vue#8507

@kazupon
Copy link
Owner

kazupon commented Jul 17, 2018

Thank you for your reporting!
I'll try to check this issue now.
please wait.

@peluprvi
Copy link
Author

Thank you a lot @kazupon .
It is hard to me to separate it from vue-i18n and vue, because I don't know much about the both core.

Please make sure you read my updated comment at vuejs/vue#8507 (comment) .
And let me know if you need more information.

@cbgrape
Copy link

cbgrape commented Aug 29, 2018

I can confirm the memory leak of Vue-i18n 7.4.2 (using Vue 2.5.3). I inspect this with Chrome inspect function on Node.js. I included Vue-i18n in my project without doing anything but got the memory increase everytime I ran the same set of requests. When I remove it from the project, things go on well.

@patric-eberle
Copy link
Contributor

Any update on this?

@Tob0t
Copy link

Tob0t commented Nov 3, 2018

I don't know if its related to this issue but I think I fixed one memory leak by refactoring the internal remove function since its only looking for the first element occuring in the array instead of looking for all elements. It happend quite often that my Components were registered multiple times.
Check it out here Tob0t@d538fd8

Let me know if you need a pull request for that.

@stygmate
Copy link

stygmate commented Jan 5, 2019

I have the same problem: when using vue-i18n 8.7.0 and vue 2.5.21.
I can't find any quick fix to avoid this problem.

@stygmate
Copy link

stygmate commented Jan 7, 2019

Sadly, I will have to remove vue-i18n of my project if this issue is not resolved ? (it's a commercial project with deadlines) Any news on this ?

@uf018127
Copy link

uf018127 commented Jan 7, 2019

For your information, it is vuejs mixin bug and it has been fixed in dev branch.
vuejs/vue-class-component#291

@peluprvi
Copy link
Author

I can confirm that my real case has been fixed after update all packages I was using. But I didn't test it to find out which package fixed it. I'll close the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants