ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.34k stars 104 forks source link

Sleek memory leak? #472

Closed ghost closed 1 year ago

ghost commented 1 year ago

Is it an actual bug? I think so. Sleek uses high amounts of ram.

Did you check if the bug has already been reported? Yes

Describe the bug Sleek uses high amounts of ram

To Reproduce Steps to reproduce the behavior:

  1. Run Sleek and check it's memory usage
  2. When Sleek has been running for a day or two, its memory usage has gone from around 140mb to sometimes over 1gb (screenshot)

Do you see any error entries in sleeks developer tools? There was an error setting cookie_pk_id.3.4209. Please check domain and path. Doubt it's related.

Expected behavior Consistent memory usage.

Screenshots See https://imgur.com/a/dtLnCZD

Desktop (please complete the following information):

ransome1 commented 1 year ago

@stianmandarin I'm not sure if this is a memory leak. sleek is based on Electron. It contains a headless Chromium browser and thus is heavier on the ressources than native apps.

But I'll have an eye on this.

ww-9 commented 1 year ago

@ransome1, it's definitely a memory leak. In my case, sleek starts with 100mb of memory and then goes up to 500 or more. This should not be the case.

Bleskocvok commented 1 year ago

Yeah, I agree it's most likely a memory leak. I have left sleek open for a few hours today and it's memory usage has creeped up to 2GB (and I only noticed because my game was lagging). sleek version: 1.3.0

image

ransome1 commented 1 year ago

I'm currently rewriting large chunks of sleek and will try my best to make sure to fix.

ransome1 commented 1 year ago

@stianmandarin @Bleskocvok @ww-9 @carvid It's a very early developer preview. I took care of a more precise event handling and I hope having solved this issue by doing so. At this point sleek is probably not yet in the state of production use (many features are still missing), but if you could observe this release for memory leaks it would be very helpful: https://github.com/ransome1/sleek/releases/tag/v2.0.0-dev1

ww-9 commented 1 year ago

@ransome1 I only tested for 10 hours, but the memory consumption results are impressive. <50mb overall. Thanks!

ransome1 commented 1 year ago

Was it just running in the background or were you actually working with it, adding new files, reloading it, adding, editing and removing todos?

ww-9 commented 1 year ago

There was a little bit of basic use too, but most of the time in the background.

ransome1 commented 1 year ago

I'll consider this good news then :) Please keep me posted if memory starts leaking, please.

ransome1 commented 1 year ago

I'm closing here, because I think the new implementation should have solved this issue. If this occurs in the future again, we can reopen here.