NickeManarin / ScreenToGif

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
http://www.screentogif.com
Microsoft Public License
23.06k stars 2.15k forks source link

Excessive RAM and disk usage #983

Open nomis51 opened 2 years ago

nomis51 commented 2 years ago

Sometime (pretty often actually) when I resize the area of capture using the Record Screen option, my mouse pointer starts to lag heavily, like if my monitor was suddenly outputing 3 FPS. Also, when I start the recording, right after the lag with the mouse pointer, the WM of Windows (10) starts to use an enormous amount of RAM. The other day it almost crashed the entire system (completly frozed for 30+ sec), because it was using 15Gb+. I managed to taskkill ScreenToGif and RAM went back to "normal" usage. Usually, it doesn't go up that hard on the RAM, but I always notice an excessive usage (couple Gb) every time the mouse pointer lag right before I record the screen.

Also, a 2 mins 1000x1000 15 FPS Gif eats up to 6Gb of disk while ScreenToGif is saving it to a file, that has a final size of a couple Mb, like 3-8Mb. I honestly don't understand how the app can use that much resources for such tiny data.

I've used Gifex on Linux several times and I never experienced such excesssive resources usage. I know it's not the same OS (That's why I tried ScreenToGif for Windows), neither the same technology (WPF vs Qt), but it's still the same kind of work...

Infos: Windows 10 32Gb of RAM

NickeManarin commented 2 years ago

For issue with the recorder, have you tried using the new UI? It's under Options > Recorder and it's going to replace the old version in the near future.

I understand that the older UI lags when resizing, specially if resizing from the top-left corner, that's one of the reasons why I'm migrating to a newer variant.


For the issue with file size, right now the recorder captures and stores the frames individually, in order to be easily accessible to the editor. In order to improve that, I need to rework the editor, adding support for a better file handling scheme.

nomis51 commented 2 years ago

It was actually the New Version that was lagging, it was selected by default.

A bit more infos, i was recording "Per second" and with "DirectX", to "Files".

monlinkleo commented 2 years ago

I also encountered it. Is this solved now?

nomis51 commented 2 years ago

Honestly, it was flooding my hard drive and RAM so hard most of the time, so I switched to the good old LICEcap. UI is crappy but its works and doesn't blow up my hard drive and RAM, since I didn't get anymore feedback. I would be glad to switch back to ScreenToGif if that issue is fixed.

I still don't understand how some 15 fps samples can eat that much disk space and RAM in a few seconds

NickeManarin commented 2 years ago

Let's go point by point.

First, make sure that you are using the latest version (2.34.1).

1) Resize lag:

Ok, since you were using the newer recorder, do you mean that you were using the area selection? If that was lagging down, try disabling the magnifier (Options > Recorder > [ ] Enable the screen magnifier.)

2) Recording size:

Since the recorder captures uncompressed frames, the size can go up significantly. But it depends on the content being recorded. For example, a two-minute recording of this page got me to around 182 MB in png file mode (165 MB in mem cache mode, that uncompressed to 200MB later). To get to 6GB I had to leave for 5min capturing a high detail picture.

The app uses a folder cache to store its frames. You can set to clean after you are done by pressing discard or by setting the clean-up task to run more frequently. Anyway, the idea of the app is to use it for small recordings.

3) Memory consumption:

During recording, the app didn't pass 230MB. It reached 600MB when encoding to gif. If you are reaching enormous amounts of RAM usage, there's possibly a memory leak somewhere. I'll need the exact steps to try to reproduce it.


If you want to test beforehand the next version of the app (will be released in a few days), here is it:

ScreenToGif.2.35.Portable.x64.zip ScreenToGif.2.35.Portable.x86.zip ScreenToGif.2.35.Portable.Arm64.zip