Memory leaking somewhere?

This might already be discussed at some points. And i see this happening for a few years, so maybe some known limitation or something. Just wanted to throw it out there.

I have lots of events. I clean them up every few months or so. Like today, i had 250+ total and deleted 60. When i first open manager and start deleting, everything is snappy and fast. But after a few deletes i can notice a pause when clicking on buttons. When i delete event, can see how buttons redraw and how animation of event disappearing runs in slow motion. Mouse pointer starts lagging behind my actual hand movement. Railendar is still using very little of memory.

I tried this but I did not notice any slowdown when deleting multiple items. The list does quite inefficient updating after delete which causes the flickering. I can fix that. After item is deleted all the calendar and list windows get redrawn which takes time so the whole operation cannot be optimized very easily.

1 Like

could this be related to the issue in an old thread or even the same issue?

https://forum.rainlendar.net/t/rainlendar-2-is-extremely-slow-and-lags/5998

i too still see flickering, a cpu spike, and mouse pointer lag at times. for me, it seems to occur after some period of time. on a freshly booted system any “snooze” or “completed” i do is fine. however, at some point the performance issue arises. no idea if it is related to how long Rainlendar has been running or the number snooze/completes i have done. it only lasts for 15 seconds or so and i don’t have that many alarms set so it does not bother me too much.

1 Like

Yes, the redrawing can affect the performance although it should always take roughly the same amount of time. Writing the events can be slow too if the events file is large and stored on a network folder.

If you run Rainlendar in the debug mode (see Rainlendar) you can see from the log how long it takes to redraw the windows and to write the events file.

1 Like

Ok, i will try the debug mode. Btw, is it ok that i have dozens of tmp files from 2012-2015 year in my rainlendar2 settings folder? Safe to delete them maybe? Also, my alarms file is 432KB.

I have tried to run with Debugger mode and to go and delete some events. But i don’t have them enough yet. Was not able to reproduce the exact same situation. I think maybe it affects if a lot of alarms are showing already on the desktop. Then maybe Manager becomes more sluggish when deleting events. Today i only had 4 of them showing.

Logs has a lot of personal info which will be hard to comb through (3 MB+). These are last entries before closing Rainlendar. After deleting 15 or so events i have noticed a bit slower buttons redrawing in the manager and context menu appearing slower when right clicking on an alarm. But no slow mouse pointer floating this time.

22:10:43: [0:31:46.237] DEBUG: Created todo list with 0 items in the array
22:10:43: [0:31:46.238] DEBUG: Update rate for window Todo List set to 0
22:10:43: [0:31:46.239] DEBUG: Redrawing window Todo List took 0 ms (1, 1)
22:10:43: [0:31:46.239] DEBUG: SetZPosition() for Todo List to 3
22:10:43: [0:31:46.239] DEBUG: Redrawing all windows took 179 ms
22:10:43: [0:31:46.239] DEBUG: CWindowImplWin32::OnMouseLeave()
22:10:45: [0:31:48.648] DEBUG: Tooltip closed because mouse (108, 24) is not inside the rect anymore.
22:10:46: [0:31:49.274] DEBUG: Window Calendar was activated
22:10:46: [0:31:49.275] DEBUG: Window Calendar got focus
22:10:46: [0:31:49.277] DEBUG: CWindowContainer::OnRightDown(): result: 0
22:10:46: [0:31:49.445] DEBUG: CWindowContainer::OnContextMenu: 0000000000000000 84x8
22:10:46: [0:31:49.445] Menu date Invalid time
22:10:46: [0:31:49.488] DEBUG: Info for skin: Shadow4
22:10:46: [0:31:49.503] DEBUG: Skin “Shadow4”: The size (10188488) and modified (1652435392) match with the cached values.
22:10:47: [0:31:50.876] DEBUG: CControlWindow::OnCommand(5006)
22:10:47: [0:31:50.876] DEBUG: Exiting the application
22:10:47: [0:31:50.876] DEBUG: CRainlendar::OnExit()
22:10:47: [0:31:50.881] DEBUG: Window Calendar was activated

The few log lines don’t really tell much but it does say that the redrawing of the windows took only 179 ms so at least that’s not causing the problem.

I know this is not enough, but today i was doing regular cleanup. Deleted maybe 30-40 reminders one by one. In the end it was slower to redraw, but mouse was ok. But when i would close some alarm it would make mouse cursor to drag for a few seconds. In debug log it showed at the end

21:37:53: [0:27:04.475] DEBUG: Redrawing all windows took 764 ms

And i saw how this was growing from 100 something in the beginning.

Btw, which parts of debug log are actually useful? It generated 50k+ lines and 99% of contents is ID and name of my events repeating over and over. Maybe debug should have an option of omitting actual names of events and just show the IDs.

The window redraw should be pretty constant if the number of events to be drawn doesn’t change much so it’s strange that it changed that much. I’ll need to do some testing to see if I’m able to reproduce the problems somehow.