takedajs / TitleUrlCopy

Add-ons for Firefox
https://addons.mozilla.org/ja/firefox/addon/titleurlcopy/
6 stars 4 forks source link

Firefox version critical memory leak #10

Open networm opened 6 years ago

networm commented 6 years ago

I damn like this addon. It is very useful when I need to share some link to others and I could add both title and url to them. Without opening it they will know what it has.

Recent several months, I found that there is memory leak on Windows 10 and macOS 10.13.2.

Here is my environment:

At first I thought it is a Firefox bug. But today I found memory is increasing quickly and when I disable addon one by one, I found that this addon is root cause. When I disable it, memory number in task manager stoped increasing and after enable it the number has been quickly increasing. I have disabled all addons and enable or disable it to test.

The increasing speed is about 30M - 100M per second. After it reached 5~6G, it will decreased to 1.5G and start increasing again.

But I also found memory leak on macOS 10.13.2. When I sleep the macOS and open it next day. Firefox will consume all memory about 20G totally.

I don't know what has happend. If you need something which help debugging, please let me know. I will provide it as quickly as possible.

takedajs commented 6 years ago

@networm Thank you for the issue.

I do not know the certain cause. However, I think that the reason for the following processing periodically obtaining option setting is the cause.

window.setInterval(getCheckCopy,1000); window.setInterval(getCheckAllTag,1000); window.setInterval(getTitleUrls,1000);

https://github.com/takedajs/TitleUrlCopy/blob/master/content-script.js

networm commented 6 years ago

I always like open about 50 tabs and keep it background. But when I quit Firefox and reopen, tabs is not loaded until switch to it. But memory leak happened in both scenarios.

takedajs notifications@github.com于2018年7月28日 周六17:22写道:

@networm https://github.com/networm Thank you for the issue.

I do not know the certain cause. However, I think that the reason for the following processing periodically obtaining option setting is the cause.

window.setInterval(getCheckCopy,1000); window.setInterval(getCheckAllTag,1000); window.setInterval(getTitleUrls,1000);

https://github.com/takedajs/TitleUrlCopy/blob/master/content-script.js

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/takedajs/TitleUrlCopy/issues/10#issuecomment-408594688, or mute the thread https://github.com/notifications/unsubscribe-auth/AAa5MLKqBntpD4r6VzkX1xd5Wkm1WtGDks5uLC1HgaJpZM4VjisN .

takedajs commented 6 years ago

@networm There is a possibility of getting up when opening a large number of tabs. Sorry, there is a possibility of a problem that can not be solved immediately...

networm commented 6 years ago

It seems that Copy as Markdown doesn’t have memory leak. I think you could take a look at it.

Shohei Takeda notifications@github.com于2018年7月28日 周六17:34写道:

@networm https://github.com/networm There is a possibility of getting up when opening a large number of tabs. Sorry, there is a possibility of a problem that can not be solved immediately...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/takedajs/TitleUrlCopy/issues/10#issuecomment-408595251, or mute the thread https://github.com/notifications/unsubscribe-auth/AAa5MK7AY2jwDXxV0dLHr0dCbf3ReFcXks5uLDARgaJpZM4VjisN .

takedajs commented 6 years ago

@networm Thank you! I'll check it.