ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.26k stars 2.27k forks source link

Tournament client performance issues (video decode related?) #11477

Closed KotRikD closed 2 years ago

KotRikD commented 3 years ago

Describe the bug: There are strange lags on video(mp4) on certain tabs. I think this is due to the number of teams, of which we have 64. But I don't understand why it only happens on a couple of tabs

Screenshots or videos showing encountered issue: link to video look on schedule/win tabs. A little lags bracket, but it is understandable, 64 commands are difficult to render. And compare it to the mappool or gameplay tabs.

osu!lazer version: GitHub version from this commit click

Logs: network.log performance.log runtime.log database.log

bdach commented 3 years ago

What is the resolution of the background video itself? I have seen some pretty choppy results with 4K video backgrounds. Would be useful if you also pulled up the FPS counter and the performance window (Ctrl+F11 and Ctrl+F2, respectively) on the video, so that we can see what's eating up frame time in particular.

That said the way we do video (software decoding) is not super efficient. Related issue: https://github.com/ppy/osu-framework/issues/4079

TheEZIC commented 3 years ago

The main oddity. It does not lag in all menus. I don't remember how it's now, but it lag on the winning screen in the past.

KotRikD commented 3 years ago

Another vid with fps advanced counter This video is 1920x1080 encoded with N.VENC with CQP=19.

I thought now, maybe it has problems with high bitrate?

bdach commented 3 years ago

1080p isn't that much. High bitrate may be related, yeah, but I can't say that I've looked into video decoding perf much. Best bet is probably having a go at hardware decoding and seeing if it improves things.

peppy commented 3 years ago

To rule out other issues, have you tried turning off the video or replacing it with another one? This seems like something that you could fix at your end in the short term (fixing video decoding performance is not that high on our priorities right now).

KotRikD commented 3 years ago

Yesterday I tried to take video from my old tournament(mp4 encoded with x264), it was about the same situation, also I tried to reduce the bitrate of the video, as I wrote above, but this also did not lead to any success.

KotRikD commented 3 years ago

And I think the videos are okay, because on the mappool or gameplay tab all is fine

peppy commented 3 years ago

Can you reproduce with no videos loaded then?

bdach commented 3 years ago

As @MiraiSubject rightly pointed out on discord the tournament client shown on the video seems to have modifications applied to it (bracket matches are wider, avatars are circular). Does the same thing occur on a clean build without these modifications? Additionally, are you building the modified tournament client in release config?

KotRikD commented 3 years ago

video

from beginning - 01:06 @bdach question 01:06 - end @peppy question

bdach commented 3 years ago

Certainly looks like bracket view isn't holding up too well perf-wise when zooming out even on master. The choppy background may still be due to decode perf, possibly because this branch in the decode loop is getting hit. Again, that may well improve with hardware decoding.

peppy commented 2 years ago

Hardware decoding has now been added- can you re-test this if possible?

MiraiSubject commented 2 years ago

Retested using the video in https://github.com/ppy/osu-framework/issues/3519 and have not encountered any performance issues. Decoding also correctly works on the graphics card now.

image

peppy commented 2 years ago

Will tentatively close this for now, thanks for testing.