leoding86 / webextension-pixiv-toolkit

A web extension for Pixiv
1.46k stars 89 forks source link

Visit history uses ridiculous amounts of RAM #171

Open Bogdan-Stankov opened 2 years ago

Bogdan-Stankov commented 2 years ago

Describe the bug I noticed that I was constantly running out of RAM using this extension if I open multiple Pixiv tabs. After testing with the same 24 tabs, I got around 2GB of RAM taken up without the extension, around 2.5GB with the extension and history disabled, and upwards of 9GB with visit history enabled.

Expected behavior Keeping visit history honestly doesn't seem worth doing if it costs that much RAM.

Example work from Pixiv Happens with any work.

Browser and Version (please complete the following information): firefox 97

Settings of extension Settings are at default, other than visit history.

CodeUnit02 commented 2 years ago

Big thanks to the topic creator for this. I myself have been facing huge lags whenever using this extension.

At first, I thought it was something wrong with my browser, so I was heavily contemplating on migrating to some other browser. But since there's not many good choices in terms of speed, power, and privacy and I already migrated a few times due to other issues with past browsers, I just put a pin on it, so I only would come to it under extreme circumstances. Thankfully I did that, otherwise I would've migrated for nothing. It turns out it was this extension that was the issue. That's what been causing my power, memory and CPU usage to skyrocket. It even affects other things I do on the side. It's a good thing I had the intuition to test out if it was one of the extensions at fault. And I assumed it was just simply because of the tool kit bar needing to load up on every page, so I was deciding heavily if I should normally disable it unless I actually need to use it to download bulk images or ugoiras since it seemed that the issued outweighed the benefits. Because what would normally be a less than 5 min task turned into 10-15 min... Basically, 2-4x the length of time more than needed to complete a task...

But I still liked the convenience of it when I do use it. So it was then I decided to report this to have them fix it because it would be really annoying to flip it on and off whenever I don't need it. And then that's how I came across this thread. Now I don't have to disable the extension at all, thank gods...

So to the creator(s) that will come across this, I ask that you consider putting a warning next to the save history feature that says that it would consume a huge ton of ram. Because my 16 GB ram couldn't handle that feature. I was thinking about just trying to use 100 saves or even 10 saves only, but I don't want to waste more time for trial and error. And I especially don't want to tax my PC parts any further. I've been having this problem for a few months now. Probably already strained/stressed my CPU and ram cards due to this... I don't want to wear out my parts any further.

And seeing as the OP had to completely shut off the feature to gain a huge performance, so I doubt me dropping down the limit will help any. It seems to me like the feature and the process itself that writes/overwrites the saves is what tanks the ram rather than the save slot space. At least that's what I think.

TL;DR PLEASE PUT A RAM USAGE WARNING NEXT TO THE SAVE/VISIT HISTORY FEATURE!