Skip to content

Fix UI freeze#239

Merged
LargeModGames merged 2 commits into
LargeModGames:mainfrom
rlpratyoosh:fix-ui-freeze
May 9, 2026
Merged

Fix UI freeze#239
LargeModGames merged 2 commits into
LargeModGames:mainfrom
rlpratyoosh:fix-ui-freeze

Conversation

@rlpratyoosh
Copy link
Copy Markdown
Contributor

Summary

Fixes Issue #238

  • Taking app lock before fetching recommended songs was freezing the UI, so moved it after the fetch.
  • Sequentially fetching tracks was causing N+1 problem resulting in approx 10s latency. Using tracks endpoint was reducing the latency from 10s to 2s. But since it was deprecated, I used future::join_all() to fetch tracks concurrently, reducing the 10s* latency to approx 4s.

Testing

cargo fmt --all
cargo clippy --locked -- -D warnings
cargo test --locked
test result: ok. 174 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s

Instead of taking app lock before API fetch, taking it after fixes the issue
Replaced sequential N+1 API calls with future::join_all to execute track requests concurrently, dropping latency from appprox 10s to approx 4s
@rlpratyoosh
Copy link
Copy Markdown
Contributor Author

Apologies for the CI trip-up... I split the work into atomic commits for easier review and accidentally dropped the changes made by cargo fmt. I just amended the commit and force-pushed the corrected formatting.

@LargeModGames LargeModGames merged commit 2d9f563 into LargeModGames:main May 9, 2026
5 checks passed
@LargeModGames
Copy link
Copy Markdown
Owner

@all-contributors add @rlpratyoosh for code, bug

@allcontributors
Copy link
Copy Markdown
Contributor

@LargeModGames

I've put up a pull request to add @rlpratyoosh! 🎉

LargeModGames added a commit that referenced this pull request May 9, 2026
Adds @rlpratyoosh as a contributor for code, bug.

This was requested by LargeModGames [in this
comment](#239 (comment))

[skip ci]
@rlpratyoosh rlpratyoosh deleted the fix-ui-freeze branch May 10, 2026 06:31
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

Successfully merging this pull request may close these issues.

2 participants