ra1nty / DXcam

A Python high-performance screen capture library for Windows using Desktop Duplication API
MIT License
457 stars 67 forks source link

Memory Usage? #51

Closed glokuosta closed 1 year ago

glokuosta commented 1 year ago

I did a comparison between DXcam and d3dshot (after seeing dxcam memory usage) and while d3dshot stays at a stable ~50 MB RAM usage, DXcam uses about 750 MB.

I just ran d3dshot.create().screenshot_to_disk_every() for d3dshot, and uses about 56MB, but dxcam.create().start() keeps increasing in RAM usage and stops increasing at around 750MB. (Increase in RAM usage is proportional to target_fps value.). Calling get_latest_frame or just simply time.sleeping doesn't affect the ram usage.

Are these values normal for DXcam?

glokuosta commented 1 year ago

fixed it by setting max_buffer_len to 1 in dxcam.create