cherrytree icon indicating copy to clipboard operation
cherrytree copied to clipboard

After saving the file, the memory usage will increase abnormally

Open luoluo74751 opened this issue 1 year ago • 6 comments

Version, Operating system windows10

Describe the bug After saving the file, the memory usage will increase abnormally After I save my files, the entire software's memory usage keeps increasing as if there is no upper limit before: image use save: image

thank!

luoluo74751 avatar Oct 17 '24 02:10 luoluo74751

Another user's test: Windows 10, 1.2.0 (nolatex, installed). 500MB CTB

  1. Open CTB: task manager states 48MB memory
  2. minor edits, manual save: now 221 MB
  3. minor edits, manual save, now 348 MB
  4. minor edits, manual save, now 339 MB
  5. minor edits, manual save, now 338 MB.

It seems to top out at around 340MB for me.

dbwiz avatar Oct 17 '24 18:10 dbwiz

Another user's test: Windows 10, 1.2.0 (nolatex, installed). 500MB CTB

  1. Open CTB: task manager states 48MB memory
  2. minor edits, manual save: now 221 MB
  3. minor edits, manual save, now 348 MB
  4. minor edits, manual save, now 339 MB
  5. minor edits, manual save, now 338 MB.

It seems to top out at around 340MB for me.

oh... but it seems to top out 800MB for me,maybe i save many pictures?

luoluo74751 avatar Oct 20 '24 05:10 luoluo74751

and my code level is very poor,so i cant find its wrong,,,,,,,

luoluo74751 avatar Oct 20 '24 06:10 luoluo74751

emmm... image

luoluo74751 avatar Oct 21 '24 09:10 luoluo74751

As a follow up to my previous post on this item, I decided to log memory usage every 15 mins with a powershell script which I've been annotating over the last couple days. My usage is typically constant throughout the day, with CT left open while the computer sleeps, restarting CT maybe every week or so. I've found while the RAM usage does balloon out from time to time, the app also releases memory at intervals. It maxed at about 4.5G, later dropped to 240MB without prompting. I have 2 hour backup interval and the changes do not seem to be connected to that.

I'm perfectly comfortable with this usage and do not have an issue with this. Windows 10, 1.2.0 nolatex install.

dbwiz avatar Oct 24 '24 21:10 dbwiz

The reason for the memory increase at save time is that after saving the file the new file is re-parsed to ensure all is good before then rotating the backups. The main cause of memory usage is currently the undo/redo state machine of the rich text nodes and that is something I will work on soon.

giuspen avatar Oct 28 '24 18:10 giuspen