Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High memory usage when downloading #80

Open
Tokariew opened this issue Dec 14, 2022 · 1 comment
Open

High memory usage when downloading #80

Tokariew opened this issue Dec 14, 2022 · 1 comment

Comments

@Tokariew
Copy link

I was downloading my games using this script, but my linux box was reporting quite high memory usage. Like in the range of 10GB+. Are downloaded files being saved periodically on the disk, or keeped in the RAM? For windows files are split into 4GB chunks by GoG, but some of Linux games are over 20GB in size for single file.

@Kalanyr
Copy link
Owner

Kalanyr commented Jan 4, 2023

The writes for files are mostly handled by Pythons default stream flushing logic, there's nothing deliberately keeping files in memory for like performance reasons or anything*.

Resuming incomplete downloads might result in some pretty large loads though, because it reads in chunks to check if they were correctly downloaded before, but it should only be reading as needed.

Likewise calculating the MD5s for verification can result in some large reads, but those should also be done in chunks rather than all at once for large files.

*I have noticed that as of Python 3.7ish , that Python seems to be flush to disk less, if this is proving a problem, I can probably force flushes a bit more aggressively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants