buttercup / buttercup-browser-extension

:earth_asia: Buttercup browser extension
https://buttercup.pw
MIT License
228 stars 42 forks source link

CPU usage on Mac OS Catalina, Brave: 1.13.82, Chromium: 85.0.4183.83 #370

Closed tourtools closed 3 years ago

tourtools commented 3 years ago

after about 5 minutes Buttercup extension became unaccessible, its process sucks 100% of CPU:

Schermata 2020-09-03 alle 22 16 18

after killing the process and reloading the extension it follows the same behavior again and again:

Schermata 2020-09-03 alle 22 16 33
perry-mitchell commented 3 years ago

Thanks @tourtools - The reason for this is the fact that Buttercup core (5.2.1) has a very dramatic memory leak in its auto-update function, which causes large amounts of objects to be addressed and tied-up in permanent references of each other, so GC never takes care of them.

I'm currently addressing this in the core..

perry-mitchell commented 3 years ago

The base issue will be dealt with here: buttercup/buttercup-core#282

tourtools commented 3 years ago

thanks @perry-mitchell for the prompt response, I'll follow the core issue 282

perry-mitchell commented 3 years ago

So it seems like the issue is solved for me, though I haven't tested for many hours. The memory and CPU consumption is far better than it was, and I've fixed a number of poorly-performing vault item lookups in the core library. I'm about to do a release - v2.22.0.

tourtools commented 3 years ago

tested with Brave with the new plugin/core v 2.23.0 and the results are quite the same, maybe it takes a little bit more time to get stuck but after a while the process reach the 100% of CPU and the plugin became unavailable:

Schermata 2020-09-08 alle 19 40 56
ldexterldesign commented 3 years ago

FYI

Performance still bad for me in 2.23.0 (i.e. Vivaldi) but it's hit and miss

Will keep an eye on CPU next time as I imagine that may explain the hit and miss nature

Sincerely

ldexterldesign commented 3 years ago

I think this issue or https://github.com/buttercup/buttercup-browser-extension/issues/368 should be reopened

When CPU is high (i.e. >10%) the popup is delayed:

Screenshot 2020-10-03 at 20 40 14

Hope this helps

Sincerely

software - OS: Apple, macOS, 10.15.7 (19H2) software - application: Vivaldi, 3.3.2022.47 (Stable channel) (64-bit) software - extension: Buttercup, 2.23.0

perry-mitchell commented 3 years ago

@ldexterldesign Good point, I've reopened that issue.