AppFlowy-IO / AppFlowy

Bring projects, wikis, and teams together with AI. AppFlowy is an AI collaborative workspace where you achieve more without losing control of your data. The best open source alternative to Notion.
https://www.appflowy.io
GNU Affero General Public License v3.0
50.77k stars 3.38k forks source link

[FR] Free RAM #3714

Open Rasterisko opened 9 months ago

Rasterisko commented 9 months ago

Description

As the notes are opened, they accumulate in the RAM memory. It would be really nice if the app freed up the RAM when a note was closed.

Impact

There would be no risk of using too much RAM even with a lot of notes and images.

Additional Context

Using AppImage in Linux Mint 21.1 XFCE.

To add more information I did a simple test. I openned a new folder and inserted a new note just with a calendar: Início do programa consumo RAM

Them, I started to change between the two notes. The ram has started to go up indicating that for every time a note is opened, it is loaded into the ram memory, even if it has already been opened previously: Depois de algumas trocas consumo RAM After about 1 minute of doing this, I got to +100MB of RAM accumulated as the screenshot shows. I waited about 20min to see if the RAM would decrease, but the consumption remains the same. This may seem like an exaggerated test at first, but I believe it is not. A user with a lot of notes that contain calendars, images, tables, etc. will probably reach a very high RAM consumption after some short time of use if they are constantly browsing between their notes.

I think I can't say this is a bug, so that's why I openned like a Feature Request.

Xazin commented 4 months ago

I can't see that the RAM accumulates, I'm on MacOS and it seems like it falls accurately depending on current open document/database.

We did do some disposal of resources not long ago, and we definitely do not store all opened documents in RAM for the whole app lifecycle, that would have been really bad and also way more noticeable.

Can you double check that this is no longer an issue and close if needed @LucasXu0 ?

Rasterisko commented 1 month ago

Hello again,

I tested here using the last version 0.6.1 and it seems to accumulate faster now.

aa