surfbryce / beautiful-lyrics

Completely revolutionizes the Spotify Lyrics Experience by introducing Live Lyrics, Dynamic Backgrounds, and Immersive Views
1.07k stars 43 forks source link

Usage & Line Transition Issue #49

Closed YassinMossaad closed 1 year ago

YassinMossaad commented 1 year ago

First of all I have to say I love the idea of the new update, but there's one slight problem... Screenshot (981) WTF...

And the transition between every line in the lyrics is SO laggy like the whole Idea of it is to look Beautiful and so far every aspect of it does, but the laggy translations kills it all. like if the usage was this high and it worked smoothly I wouldn't have a problem, I'll just close the lyrics screen when playing a game.

https://github.com/surfbryce/beautiful-lyrics/assets/119785649/5a22972a-1e1f-4b58-8f51-3f7a0a14a937 You can see the line transition lag here AND AND see how LONG it took between songs, It stayed in Starboy for like 4 sec before going to Plain jane, this things kill the whole experience Sorry for the quality of the video

surfbryce commented 1 year ago

Yeah you’ve just discovered the biggest Issue with Spotify on Windows which is that it doesn’t support rasterization and it wastes a ton of power on nothing.

Depending on your setup it can be performance intensive, there’s no way to get around that. All the lyrics stuff is pretty well optimized, the background itself can be more so but with the limitations I have applied it’s difficult to do so.

If you could provide your CPU and GPU, that would be helpful in determining whether or not you fall into this category. This is mainly just a performance problem that comes from Spotify for Windows when they compile the app, I can’t enable the option to make this perform better on Windows because it’s baked in.

Another question I have; were you a user of the extension prior to the update? Did you have performance issues then? The main thing that uses the most power is the background itself, so usually you would see these numbers even before the update.

YassinMossaad commented 1 year ago

CPU: Intel® Core™ i7-10750H GPU: Nvidia GeForce GTX 1660ti (Mobile)

And yeah I was a user to the extension before the update but the usage wasn't nearly as much. GPU didn't get used at all most of the time, now it reaches 30%, And 1 whole GB of ram is crazy, CPU reaching 20+% is annoying in games but I just close the side bar, and Power usage isn't a problem since my Laptop is always docked, I should mention that I'm currently using a dual monitor setup so Spotify is ALWAYS open on the second screen and playing 24/7, so the whole usage thingie really impacts the performance...

surfbryce commented 1 year ago

@YassinMossaad I also use a dual-monitor setup where I have my laptop screen used for Spotify on the new Cinema mode and then use spaces (MacOS term; Virtual Desktops on PC) on my main monitor for anything work/personal related.

So my setup in terms of what I have running is the same as yours. I think the major crux here is just Spotify on Windows not having the right flags enabled to allow for performant rendering. This has been a known issue for anything blurred or animated (which is why you don't see Spotify do much of that anywhere at all).

Your GPU not being used at all most of the time prior to this update is a little odd though given that a majority of people I talked to and in testing on a windows machine myself led to GPU usage (this is expected because of the background blur and animation).

I should also state that any browser based rendering that has to render images that are high in scale and many elements will use a lot of memory naturally. Discord - another Electron based application - easily reaches up to around 1GB of memory (Renderer and GPU combined). Given how little fancy effects they are rendering - and also given that Spotify does not have the proper performance flags enabled to make this render optimally - it's not too farfetched to see 1GB of memory with the text effects, increased DOM element count, scaled up images that are blurred, and etc. All this processing and data has to be stored somewhere. Even when Spotify is stripped down it also hovers around 400MB of memory.

I am working on a different implementation of the background which should be easier on the CPU and GPU which might be released in a future update. Otherwise there is not much that I can do - as I have stated before - the lyrics side is really well optimized and performant. The only thing that could possible be optimized is the background; but, it'll take a lot of work to do so (as in keeping parity with the existing look or improving it). EDIT: I decided to check GPU usage on my end and I'm getting around the 700-750MB mark - so this is only a 300MB increase - which for the additional browser rendering makes sense.

I apologize for your degraded experience. I think ideally I could make it so there's an option to toggle the live-aspect of the lyrics.

Let me know if this would be preferred for you - otherwise - I can't really think of anything else.

xXJeS4sXxYT commented 7 months ago

Screenshot 2024-01-27 231431 This fixed the problem for me :)