-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retext consumes a lot of memory #571
Comments
Hi! Do you use WebKit or WebEngine renderer, or none of them? |
I tried with both "Use WebKit renderer" being on and off (in Edit menu). I can see that for 18 tabs there are 18 python3 processes. Each of them consumes around 83 MB of RAM. |
Thank you for the extra information. Indeed we have 1 process per tab, and these processes all load Qt libraries, so they consume a lot of memory in total. So we should either limit the number of processes (which will need a rewrite of many things) or try to reduce the memory usage by these processes. I will try to look at this when I have more time. Cc @Griffon26 — you wrote the multiprocessing code, so any ideas are welcome. |
The same shared libraries loaded in multiple processes do not use up more memory for code than a single process would. So @embeddedden, it would be interesting to know which measurement shows the memory usage. If you look at it per process it might suggest you have to multiply it while that is not the case. |
@Griffon26 I saw it in htop. |
Where do you get the 600? From SHR? The actual amount of RAM being used by a process is under RES, but parts of that memory may be shared. To really check how much physical memory is being used by additional tabs, you should check the output of the I can't try this myself at the moment, @mitya57 perhaps you can also take a look. |
In htop there is a line in the "header" about how much memory is consumed. So, when I start retext, it is going, for example, from 4.16 to 4.76 GB of consumed RAM. Here is the output of Before opening:
Being opened:
|
I just checked on my machine based on the output of
Of these 30 MB for each process, 10 MB is probably Python interpreter itself (when I start a bare interpreter, memory decreases by that amount). The remaining 20 MB are field for optimization. |
I use retext for simple markdown note taking. But the issue is that it consumes around 1 gigabyte of RAM when there are around 30 tabs. Even when the preview is disabled. The same amount of tabs in Pluma consumes only around 70 MB. Is it possible to make retext consume less memory?
I use retext 7.2.2 in Ubuntu Mate 20.04.
The text was updated successfully, but these errors were encountered: