[GH-ISSUE #36] UI Freezes #28

Closed
opened 2026-02-27 19:01:49 +03:00 by kerem · 6 comments
Owner

Originally created by @sakgoyal on GitHub (Jul 25, 2025).
Original GitHub issue: https://github.com/afkarxyz/SpotiFLAC/issues/36

I think the threading is broken. When I run this, I get 1 core stuck at 100% and the UI completely freezes and windows says it's not responding. but it is still running because the download folder size is going up.

Do you know what is causing the issue?

Originally created by @sakgoyal on GitHub (Jul 25, 2025). Original GitHub issue: https://github.com/afkarxyz/SpotiFLAC/issues/36 I think the threading is broken. When I run this, I get 1 core stuck at 100% and the UI completely freezes and windows says it's not responding. but it is still running because the download folder size is going up. Do you know what is causing the issue?
kerem closed this issue 2026-02-27 19:01:49 +03:00
Author
Owner

@sakgoyal commented on GitHub (Jul 25, 2025):

This is pinning this core to 100%

Image
<!-- gh-comment-id:3116527040 --> @sakgoyal commented on GitHub (Jul 25, 2025): This is pinning this core to 100% <img width="720" height="691" alt="Image" src="https://github.com/user-attachments/assets/2fb338f1-6786-4a72-b618-c54818195bb2" />
Author
Owner

@afkarxyz commented on GitHub (Jul 25, 2025):

I have added the update check interval to 60 seconds, perhaps this can reduce CPU load. Please wait for the next update.

<!-- gh-comment-id:3119266740 --> @afkarxyz commented on GitHub (Jul 25, 2025): I have added the update check interval to 60 seconds, perhaps this can reduce CPU load. Please wait for the next update.
Author
Owner

@sakgoyal commented on GitHub (Jul 25, 2025):

I fixed it myself. remove the stream=True from the request. just do a normal download and remove the chunk size from the iter_content. it made the download faster and no more freezes. CPU is now only ~5% without any issues.

the files are only ~15-30MB in size so streaming/chunking was completely unnecessary

<!-- gh-comment-id:3120334189 --> @sakgoyal commented on GitHub (Jul 25, 2025): I fixed it myself. remove the stream=True from the request. just do a normal download and remove the chunk size from the iter_content. it made the download faster and no more freezes. CPU is now only ~5% without any issues. the files are only ~15-30MB in size so streaming/chunking was completely unnecessary
Author
Owner

@afkarxyz commented on GitHub (Jul 25, 2025):

I am using stream=True for real-time progress tracking during download; I will consider it because you are the only one who opened the issue and you have already fixed it yourself.

<!-- gh-comment-id:3120521522 --> @afkarxyz commented on GitHub (Jul 25, 2025): I am using `stream=True` for real-time progress tracking during download; I will consider it because you are the only one who opened the issue and you have already fixed it yourself.
Author
Owner

@sakgoyal commented on GitHub (Jul 25, 2025):

on any relatively good internet, downloading 20MB should be near instant. I don't see why you need to stream, and then chunk 8kb instead of just writing it at once.

I tested this with streaming but changed the chunking to 2MB instead of 8KB and it was also not causing issues. it had higher CPU usage (~10%). but it's much better than the 8KB setting.

Either remove streaming entirely (and lose a tiny amount of progress information), or increase chunking to 2MB. even 1MB should be better.
nobody is using internet that is slower than 1mbps

<!-- gh-comment-id:3120575993 --> @sakgoyal commented on GitHub (Jul 25, 2025): on any relatively good internet, downloading 20MB should be near instant. I don't see why you need to stream, and then chunk 8kb instead of just writing it at once. I tested this with streaming but changed the chunking to 2MB instead of 8KB and it was also not causing issues. it had higher CPU usage (~10%). but it's much better than the 8KB setting. Either remove streaming entirely (and lose a tiny amount of progress information), or increase chunking to 2MB. even 1MB should be better. nobody is using internet that is slower than 1mbps
Author
Owner

@afkarxyz commented on GitHub (Jul 26, 2025):

Fixed!

<!-- gh-comment-id:3121038092 --> @afkarxyz commented on GitHub (Jul 26, 2025): Fixed!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SpotiFLAC#28
No description provided.