I have tried finding memory leaks in my vue app. I have used chrome dev tools memory heap snap shot for that. But I was not able to find any. I tried looking for tutorials or videos on youtube and google. But most of them are explaining it using Native JS. Even in official documentation of Vue, they have explained it using third party library. Now, I am not sure whether my app has memory leaks or not.
Is there any good resources which I can refer for it?
CodePudding user response:
In my opinion, profiling tools are only help you to monitor & decide if you app got memory leaks or not. It cannot throw to your face the simple result like yes or no, but it allow you to see the bigger picture of your app performance.
And following that stats you can see the problem with your app, which usually happens over time (that mean you have to monitor it, not just run the profiling tool then check the result).
Vue is just a framework/library that written in JS. So there is no magical tools to tell you exactly what's wrong with your own code.
There are some tools for Vue to monitor the render process like this one. You can see how your app re-render & why does it so. Depends on your code logic you can decide which one should only render once & optimize that part. That will prevent the memleak as well.
CodePudding user response:
Anuj memory leak is a much wider topic than one single language. There are examples using library's in documentation because generally, the third-party package which doesn't take care of memory usage leads to memory leaks we should take care of that. Check out this video to detect memory leaks in your projects.
