Undoing and redoing costing WAY too much ram

Hello ^^. I am sorry if this issue as been dealt with before but I did not find any posts about the problem I am having. When ever I undo and/or redo something in shotcut, the entire project becomes laggy, its unnoticeable in the beginning but gets worse and worse with the more undos and redos I perform, to the point where after each undo one can visibly see that the software has gotten more laggy. Saving the project, closing shotcut and restarting it doesn’t seem to fix it, it’s like the project itself becomes more and more difficult to run. As an example, when I start a new project, Shotcut is using around 4 to 5 gigs of ram (sometimes even less) but at the end of the project ( after a lot of undos and redos) it is using around 28 to 29 gigs. I in total have 32 gigabytes, so you can imagen how laggy the entire project is.
I would really appreciate any help ^^

Do you mean that Shotcut with an empty start-up project already immediately takes up 5 gigabytes of RAM? In my case, an empty project takes a little more than 200 megabytes. Give us a little more detail about your project: what resolution are the video files, what are the project settings, how much content is on the tracks? Have you tried running the relatively recent alpha version of shotcut? Is there the same problem there?

image