weirongxu / plantuml-previewer.vim

Vim / Neovim plugin for preview PlantUML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VERY BAD Memory leak in the browser

dylan-chong opened this issue · comments

The memory usage of the browser viewing the diagram has gone up from 150mb to 1 GB over the course of about 10 minutes. The diagram wasn't being edited.

I later got a message from safari saying that the page was reloaded because it was using up too much memory

Looks like it is caused by this

screen shot 2018-05-20 at 5 07 24 pm

This is getting ridiculous. My browser is using up 2gb of memory!

After forced reloading the page Now, memory usage seems to be going up by fifty megabytes every few seconds! This must be because the diagram has gotten bigger

I just recently testing in Chrome and Safari, memory leak only happens in Safari, you are the same? @dylan-chong

Seems to be the same for me. Chrome still does this though:
screen shot 2018-05-20 at 10 14 05 pm

Maybe chrome is just more efficient with removing the resources from memory.

I fixed this issue in develop branch https://github.com/weirongxu/plantuml-previewer.vim/tree/develop (Windows is not yet supported and will be supported later)

Now, its poll reloading tmp.js script instead of tmp.svg, not quite sure memory leak is completely fixed

I've just been using your develop branch for about an hour now and the memory usage is much better on Safari. The memory usage is still going up though, up to about 500 MB over roughly 1 hour from about 70mb. This may be acceptable. What you think?

Yeah, it's currently resolved by this way. Then I'll consider whether or not to use a server to solve the JVM startup problem #7 #8

If you're going to add the server i guess we can close this issue - since the memory leak is significantly better