-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Unified player] Heavy work on Main Thread during seeking on almost all videos #4286
Comments
I might have found a workaround for this ... kind of. It's not as smooth as the first video then (keep in mind that the video is recorded, on the device it's more fluid), but definitely faster responsive. Just remove / comment out these lines:
I don't see a reason for recreating the whole notification when the video is sought. This has a high impact on the main thread if it's occurs too often. |
@Stypox It's slightly faster on the video which works well but on the others it's still freezing the UI/seekbar. |
Are you sure that the delay is caused by @Stypox's notifications? Please, try to measure using logcat timestamps or Android Profiler |
@avently I think so. Probably not the actual recreation as I looked into the code of the pr ( What I did during recording:
Edit: Or it's more likely the |
@Stypox probably in case of buffering we can drop updating a notification, what do you think? It's not important event and can happen often |
Unfortunately we can't drop it completely, since a notification button changes icon alongside the buffering state, but maybe we could implement a check that prevents useless updates if the state in reality did not change. I'll not include this in #3178 though, since it is not critical and not a new bug (it has always existed). I will get to it later. |
@Stypox @avently I figured out something this moment. This specific lag seems unrelated to the notifications since disabling improves the experience but doesn't eliminate it completely. The reason seems to lie in the extractor or more likely on the client handling of the channels data (specific data from the channel which is added to I try to look into it but it could take some time since I haven't got much time currently. |
@vkay94 then it's probably a codec-related issue, since the extractor only runs once (when showing info) and provides the stream url to play. |
@Stypox I checked the codecs some days ago and they were identical. But I found the problem (it's so dumb):
The extractor passes full imageurls; some of them are I modified the handling by unifying it to |
@vkay94 unfortunately that's not the way to go, since we need the high res thumbnails to show them in the video details page. @wb9688 and @B0pol were planning to add an Image class, which would provide thumbmails at different resolutions, only then this issue can be solved. Thank you for the investigation! |
This image class sounds great, it'd be handy for the list items (history etc) too which are updated more often in the unified player builds than before. |
Version
530f745 2020-09-08
Steps to reproduce the bug
Expected behavior
The video should load shortly and start the playback and response to other actions.
Actual behaviour
The seekbar doesn't update the position for a long time. During this time the UI doesn't react to gestures ("freeze"). After a while the app crashes.
Screenshots/Screen recordings
Video demonstration: https://streamable.com/9gf4tv
The first video is the expected behavior, the second video shows the bug.
What's the reason?
During debugging I saw in the logcat that the device tries to seek to all positions which were tapped, so the doesn't discard "unneeded" positions (positions which are older than the current).
The text was updated successfully, but these errors were encountered: