albert
albert copied to clipboard
[copyq] memory leak
Yesterday I noticed that the Albert process in my machine was taking up 1.1 GB of memory. Then I noticed a correlation with CopyQ, even though Albert takes up a lot of memory by default when it launches. I couldn't find a problem with the Python script, so maybe it has to do with the way Albert manages the entries generated by the plugin.
Environment
Steps to reproduce
- Set CopyQ entry limit to 50 and fill it up
- Enable the Python CopyQ plugin
- Trigger CopyQ in Albert with "cq"
- Each time you trigger it, it will eat up ~10 MB of memory (at least on my machine)
Expected behaviour
Memory should go down and stabilize, but it doesn't seem so.
I notice similar behaviour, except each trigger consumes >20 MB.
I noticed a correlation with CopyQ
Thank you for not just telling me that you have 1 problem.
Can you please further investigate this issue? Can you trace down the subprocesses the plugin runs. Do they quit properly or do you have a lot of deamons? Since I cant debug this atm it would be cool If you could. Try to comment out some lines in the script, e.g. the item creation such that CopyQ gets triggered but no items created etc.
Most of the plugins I wrote are plain prototypes. Nothing really sophisticated. I wonder if I use subprocess correctly in the plugin.
I just keep it running in the background, and I haven't touch it for a while, it it the top of the list now.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
is this still an issue?
Yes, I can still reproduce this issue.
The amount of memory consumed after each cq
trigger depends on the contents of the clipboard, but the memory usage rises nonetheless.
Why is this still open?. Is it not fixed yet?.
This plugin has no maintainer atm. It is pretty small so if you are interested you could try to fix the issue.
I'll have a look at it and see if i can do something about it.
Facing the same issue on xubuntu.
@thiagoa @bergercookie does rofi/ulauncher have a copyq extension?
@ManuelSchneid3r I'm not sure. I'm using https://extensions.gnome.org/extension/779/clipboard-indicator/
Not perfect but it does the job.
I just wondered why you blame Albert as a whole, just because the copyq extension is buggy.
@ManuelSchneid3r I'm not blaming Albert at all. At the time I investigated this, I recall quickly inspecting the Python code and not finding any memory leaks. I may have been wrong though, so I opened this ticket for investigation. In other words, I'm not really sure where the problem is. Also, I really appreciate that Albert is a nice option and it was really useful to me in the past. Thank you for all the hard work you put into this project, not an easy feat.