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

[BUG] high CPU usage when disconnected #420

Open
dman-os opened this issue Jul 14, 2024 · 2 comments
Open

[BUG] high CPU usage when disconnected #420

dman-os opened this issue Jul 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dman-os
Copy link

dman-os commented Jul 14, 2024

Describe the bug

If in a middle of a download, your connection goes out, the CPU usage goes up significantly.

To Reproduce

Steps to reproduce the behavior:

  1. Start a new download.
  2. Disable wi-fi or disconnect ethernet.
  3. Observe CPU usage.

Expected behavior

CPU usage shouldn't be so high when it's doing nothing.

System information

Please complete the following information

  • Operating system: Windows 11
  • Version: 1.10.11
  • Installation method: scoop
  • Python version: scoop managed

Additional context

I'm also surprised at the usage of 4GiB of ram for a downloader. On the other hand, I really appreciate that the downloads are resumable.

@dman-os dman-os added the bug Something isn't working label Jul 14, 2024
@dman-os
Copy link
Author

dman-os commented Jul 14, 2024

Oh wait, could this be an issue with legendary? I reported this here because the name of the executable is rare but I see now it's just using legendary as a library.

@loathingKernel
Copy link
Contributor

loathingKernel commented Jul 14, 2024

If in a middle of a download, your connection goes out, the CPU usage goes up significantly.

I reported this here because the name of the executable is rare but I see now it's just using legendary as a library.

I can reproduce this issue locally when disconnecting the network cable too with both Rare and using Legendary's CLI interface. If you can reproduce it with Legendary too, opening an issue there too could be useful. On our side, I have to look into it further still, so I don't know if it is amendable.

I'm also surprised at the usage of 4GiB of ram for a downloader.

This depends on when the RAM usage was measured. Most of Rare's RAM usage comes from the game cover art loaded to display the library, so depending on the size of the library it can get "high", but to give you a reference, my own library with 400+ games, Rare uses around 360MiB of RAM and around 150MiB of that is Qt's libraries.

If the RAM usage was measures while downloading that is largely outside of Rare's control (and Legendary can't do much about it either until it has an on-disk cache mechanism) and it depends on the game itself, the number of download workers and the maximum shared memory defined in settings (workers default to the number of CPU cores and the shared memory depends on the game's assets, if they are unset).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants