BlackHole icon indicating copy to clipboard operation
BlackHole copied to clipboard

Severe Fps drops

Open hhacker1999 opened this issue 3 years ago • 5 comments

App is good for what it does, but when I navigate around for some time, playing different songs I noticed very bad fps drops. I am using a SD855 device so I do not think It is because of my phone. Is this something you are already aware of? I am also a developer and I am curious is there a lot of unnecessary ui rebuilds or set state calls being made.

hhacker1999 avatar Jan 11 '22 19:01 hhacker1999

Ya, there are some drops for few screens. And yup as you guessed it's coz of unnecessary ui rebuilds. Currently, there's no state management used inside blackhole. Even though I have tried using specific notifiers to rebuilt only specific part of ui still there are a lot of unnecessary rebuilds at few places. And actually the project was started without state management and it has become quite large. And now coz of it's size, I'm not able to add state management as I would need to change lots and lots of code and I'm too busy now a days to even add a little change, let alone whole source code change.

shadow5688 avatar Jan 12 '22 02:01 shadow5688

Earlier there weren't any noticeable drops but in last version, when I added gapless playback for youtube playlists, It caused a lot of frame drops and is one of the main reason of frame drops as of now. I personally don't use youtube section so I never noticed it before releasing. Except that there's some issue with "realme" devices, don't know why but their frame rates gets locked at 60fps. Now except these two there are still a few drops here and there but nothing quite noticeable. Anyway, let's see when I'm able to add state management to the project.

shadow5688 avatar Jan 12 '22 03:01 shadow5688

I have realme device everthing works fine unless you touch yt section. I can look into state management since this is very good project and some unnecessary frame drops ruins the experience. I will fork it and try to use bloc pattern using rxdart, but bloc requires other architectural changes. So I might need to change quite a lot of things since it is not a small task. Anything you want to tell me upfront( what is the direction of data flow etc.) which might help me will be highly appreciated.

hhacker1999 avatar Jan 12 '22 05:01 hhacker1999

Ya, actually I have plans to add state management too. But it's just too much work to modify current one. I'm thinking to build it again from scratch with state management and other stuff so as to increase performance. That way it will be much easier to change stuff. And we can just copy paste some stuff from the current project. Finally after everything works fine we can just merge it with this one.

shadow5688 avatar Jan 12 '22 05:01 shadow5688

Yes, that might be the best option.

hhacker1999 avatar Jan 12 '22 05:01 hhacker1999