Skip to content

macosx: Fix freezing on play caused by searching for other music applications

Claudio Cambra requested to merge claucambra/vlc:work/fix-freeze-on-play into master

I consistently get freezes when pressing play or when reopening the window, especially when there are a lot of playlist items in the playlist.

Profiling VLC it shows that this is caused by calls to SBApplication's applicationWithBundleIdentifier: to look for Apple Music, Spotify and iTunes in order to stop their playback.

Screenshot_2023-03-01_at_23.28.30

These calls are individually very slow, and calling them each time on the main thread causes the freeze.

A much better and faster way of doing this is to look for these apps only once asynchronously, store the pointer, and access when needed.

Signed-off-by: Claudio Cambra developer@claudiocambra.com

Merge request reports

Loading