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]: Whisky hangs at startup #688

Open
1 task done
luosheng opened this issue Dec 8, 2023 · 2 comments
Open
1 task done

[Bug]: Whisky hangs at startup #688

luosheng opened this issue Dec 8, 2023 · 2 comments

Comments

@luosheng
Copy link

luosheng commented Dec 8, 2023

Description

When Whisky starts, it might hang for 10+ seconds, depending on how many pinned programs are there.

It's because fetching the best icon for the program can take somehow up to 3 seconds for a program (tested on a MacBook Pro M1 Max). This happens on the main thread thus blocks the whole UI.

And for some reasons, PinView was loaded twice on startup, which doubled the hang time.

截屏2023-12-08 23 49 45

Steps to reproduce

Just pin 4~5 programs and launch Whisky. In my case, getting an icon for Cyberpunk 2077 takes the longest time.

Expected behaviour

Make the icon fetching running in the background and maybe cache the icons? Also make PinView only run once.

Logs

I added some logging to `PinView`'s `onAppear` and here's the output:

Fetching best icon for: Ugly
Execution Time: 1.070072054862976 seconds
Fetching best icon for: Agatha Christie - Murder on the Orient Express
Execution Time: 1.0541011095046997 seconds
Fetching best icon for: Cyberpunk2077
Execution Time: 2.8241089582443237 seconds
Fetching best icon for: Steam
Execution Time: 0.29903101921081543 seconds
Fetching best icon for: Agatha Christie - Murder on the Orient Express
Execution Time: 1.05880606174469 seconds
Fetching best icon for: Steam
Execution Time: 0.28040599822998047 seconds
Fetching best icon for: Cyberpunk2077
Execution Time: 2.7935760021209717 seconds
Fetching best icon for: Ugly
Execution Time: 1.066970944404602 seconds

What version of Whisky are you using?

2.2.1

What version of macOS are you using?

Sonoma (macOS 14)

Issue Language

  • Yes my issue is written in English
@luosheng luosheng added the bug label Dec 8, 2023
@IsaacMarovitz
Copy link
Member

Fixed by #670

@luosheng
Copy link
Author

luosheng commented Dec 8, 2023

FYI, the double loading seems to have something to do with the bottomBar modifier.

@IsaacMarovitz IsaacMarovitz removed the bug label Oct 1, 2024
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