-
Notifications
You must be signed in to change notification settings - Fork 85
Slow Memory Leak #96
Comments
Was just wondering for both cases wouldn’t a VecDeque be optimal since all of the important data is more recent, and its default is pushback popfront? Edit: after looking up some more, perhaps looking into the circular queue crate is worth considering or implementing a circular queue struct. |
Yes you are right that Also just as another note I'm monitoring the version from #98 with Thanks for the suggestion though, I'll definitely keep it in mind when the PR gets closer to merging! Edit: using |
Yep sounds good, specifically I had seen a crate here, that also seems to fulfill the same purpose, but honestly it’s probably just a matter of API and implementation. |
Thanks for pointing that out! The only problem I noticed from my admittedly short look was that I don't see any way of modifying the size after creating the |
Required information:
ytop -V
):ytop 0.6.2
uname -a
:Linux Cthulhu 5.7.6-arch1-1 #1 SMP PREEMPT Thu, 25 Jun 2020 00:14:47 +0000 x86_64 GNU/Linux
Include any of the following information if relevant:
alacritty 0.4.3
tmux -V
): NAPlease copy or attach
~/.local/state/ytop/errors.log
if it exists and contains logs:Hello, there is a very slow memory leak in
ytop
. It probably hasn't been reported yet since it would take several days before using a noticeable amount more RAM. I actually only noticed it after I was poking around the code making other changes 😅. It's nothing too exciting, but it stems from pushing all the readings for the graphs intoVec
s without every actually restricting the number of readings that are kept. I decided to monitor this over some time just to see how quickly it would build up over time (This is on a laptop with 4 CPU threads since it matters for the number of CPU readings taken). It would be several more days before the increase in usage would jump from ~30 MiB to ~60MiB, so I decided it was enough information to go ahead and report this.The two ways I could think of fixing this are
ytop
in a half-width window, waited for a while then made it full-width it would take time to fill in the extra information, but I would prefer this solution since it seems like less of a hack and handles shrinking and growing the windows well.I'd be more than happy to implement whatever solution you decide to pick!
The text was updated successfully, but these errors were encountered: