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 #53

Open
solunafantasy opened this issue Nov 10, 2024 · 6 comments
Open

High memory Usage #53

solunafantasy opened this issue Nov 10, 2024 · 6 comments

Comments

@solunafantasy
Copy link

solunafantasy commented Nov 10, 2024

Feature Description

I am seeing extreme memory usage, more notable when adding 2.5K songs in queue. I first noticed this when Spotify and browsers crashed due to being out of memory, ( I don't normally use a page-file, I have 32GB of RAM)

Justification

Better memory management will avoid systemwide issues/improve performance. This is Windows 11, latest patch and 1.0.2. I am unsure if other versions are affected. I only noticed this after loading a larger then usual list. (since that seems to be working now)

Additional Information

memory
@solunafantasy
Copy link
Author

solunafantasy commented Nov 10, 2024

In the Interm, I have added 64GB of page-file on an SSD to mitigate to continue operation. I also have stopped adding songs until the current queue is exhausted. (I believe i have 5-6k still being added) Obviously not optimal but will allow the app to run for now. It would be a major PIA to requeue everything. I could imagine that this will degrade the app once it starts being utilized.

@justin025
Copy link
Owner

justin025 commented Nov 10, 2024 via email

@solunafantasy
Copy link
Author

solunafantasy commented Nov 11, 2024

It drops from 20GB to 13GB of ram after I clear completed downloads. Apologies it took so long to respond, i was afk all day. Surprisingly, it never crashed. Keep in mind only a third of the queue completed and its continuing to download.

@0rkaM
Copy link

0rkaM commented Nov 11, 2024

Why on Task Manager says you have two instances running? Mine even when is in the middle of downloading, or creating the file, it shows only one instance.
And in my case, I cannot reproduce, even with a list of over 300+ queued songs, it does not go much over 260mb:
OtS 1 0 2 max download 400 song playlist no memory problem 2
I save file as OGG, I wonder if maybe you are using another format and that is where it happens.

@solunafantasy
Copy link
Author

Why on Task Manager says you have two instances running? Mine even when is in the middle of downloading, or creating the file, it shows only one instance. And in my case, I cannot reproduce, even with a list of over 300+ queued songs, it does not go much over 260mb: OtS 1 0 2 max download 400 song playlist no memory problem 2 I save file as OGG, I wonder if maybe you are using another format and that is where it happens.

Microsoft Edge.......

Anyway, I am not sure, possibly because I renamed the file?

@justin025
Copy link
Owner

justin025 commented Dec 4, 2024

The latest commit substantially reduced the memory usage on my end, ~2.3GB for 625 songs down to ~270mb (290mb with download queue thumbnails). Clearing download queue still doesn't clear memory used by the deleted widgets, so I'll hold off on closing this issue until I can find an acceptable solution.

The bulk of the usage was in the icons on various buttons, I didn't think much of it because the png files themselves are only a couple hundred bytes large but I suppose pyqt does something to them in the background with QIcon which causes them to use additional memory. The app now reuses icons, instead of making 625 spotify icons for 625 songs it makes 1.


*Just a note for any users who are attempting to use onthespot on a low spec pc, the cli interface sits at ~90mb regardless of the number of songs queued.

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

3 participants