Skip to content
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

Song select performance really bad after spectating in a multi lobby #29088

Closed
bytenekos opened this issue Jul 25, 2024 · 20 comments · Fixed by #29653 or #29701
Closed

Song select performance really bad after spectating in a multi lobby #29088

bytenekos opened this issue Jul 25, 2024 · 20 comments · Fixed by #29653 or #29701

Comments

@bytenekos
Copy link

bytenekos commented Jul 25, 2024

Type

Performance

Bug description

Stutters when pressing f2 or causing big jumps in beatmap selection (as in going from one end of the beatmap carousel to another) after going into spectator in a multi lobby and exiting

Screenshots or videos

Toolbox.2024.07.25.-.22.39.02.32.mp4

https://discord.com/channels/188630481301012481/1097318920991559880/1266115025031004181
https://discord.com/channels/188630481301012481/1097318920991559880/1266112819791925391

Version

2024.726.0-lazer

Logs

compressed-logs.zip

@Ladwick
Copy link

Ladwick commented Jul 25, 2024

I was about to make an issue for this too, I didn't know exactly it was after spectating but I noticed most times after a multi I would get horrid performance at song select, specially when hitting the random button.

@peppy
Copy link
Member

peppy commented Jul 30, 2024

I can't reproduce anything here, and the graphs you are showing aren't really crippling slowdowns either.

I've checked for leaks from multiplayer spectator and cannot find any. I've profiled performance locally and can't get a slowdown large enough to investigate further.

@peppy peppy added the missing details Can't move forward without more details from the reporter label Jul 30, 2024
@bytenekos
Copy link
Author

bytenekos commented Jul 30, 2024

I've done a bit more testing and I find it interesting how after exiting spectator and scrolling through beatmaps the gc count (in the ctrl + f2 menu) goes up drastically. No idea if that's at all relevant or if there's maybe something else that's interesting but that's what I noticed at least

Video before entering spectator (fresh start)

Osu.2024.07.30.-.23.23.38.20.mp4

Video after entering spectator (same session)

Osu.2024.07.30.-.23.25.00.21.mp4

Was also getting these kinds of messages when trying to exit the multi lobby:
image

Some logs with performance-xyz.log stuff:

logs.zip

If you have anything that you'd like me to try out to get more info/have any questions about please lmk because I just don't know what specific info I should provide in cases like these

@peppy
Copy link
Member

peppy commented Jul 31, 2024

Once you're in the bad state, can you create a memory dump from task manager (right click on the osu! process) then email it to me? You'll probably need to zip and upload to google drive as it may be quite big.

@bytenekos
Copy link
Author

Should be sent now 👌
I've attached the issue number in the subject line

@bytenekos
Copy link
Author

One observation I've noticed is that if you don't have a lot of maps, the stuttering subsides after a few "rounds" around the beatmap carousel and the stutter isn't that bad to begin with.
If you have a lot of beatmaps, performance slows down to a crawl (as mentioned in the original issue message).

Osu.2024.08.27.-.12.56.39.03.webm

peppy added a commit to peppy/osu that referenced this issue Aug 30, 2024
Very likely closes ppy#29088. It's the only thing I could find odd in the
memory dump.
peppy added a commit to peppy/osu that referenced this issue Aug 30, 2024
Very likely closes ppy#29088. It's the only thing I could find odd in the
memory dump.
@peppy peppy removed the missing details Can't move forward without more details from the reporter label Aug 30, 2024
@peppy
Copy link
Member

peppy commented Aug 30, 2024

There's a fix which will be included in the next release. Please check whether it fixes your issue. If not, please leave a reply here.

@bytenekos
Copy link
Author

Tried out the current master (a09c6e2) and the issue is still there :(
Exact same behavior as my last comment

@Joehuu
Copy link
Member

Joehuu commented Aug 30, 2024

Can confirm, reopening.

@Joehuu Joehuu reopened this Aug 30, 2024
@bdach
Copy link
Collaborator

bdach commented Aug 31, 2024

Were you both testing in debug? I'm not sure that is representative of anything if yes.

@bytenekos
Copy link
Author

bytenekos commented Aug 31, 2024

Tested with release and no difference at all. Release, debug and the current release (817.0) have the same behavior.

@peppy
Copy link
Member

peppy commented Sep 2, 2024

I've been trying to repro this with a huge beatmap database and still can't...

Confirmation that everyone that is reproing this is on windows?

@bytenekos
Copy link
Author

I'm on windows 11 23h2

@Joehuu
Copy link
Member

Joehuu commented Sep 3, 2024

Also initially tested on Windows 11, but I can also reproduce it on macOS.

I've been trying to repro this with a huge beatmap database and still can't...

That doesn't matter, I think. I only have 744 matches (beatmap difficulties), and can only reproduce if I have the files. Nuking the files, I can't seem to reproduce.

@peppy
Copy link
Member

peppy commented Sep 3, 2024

@Joehuu and it's enough to just enter the multiplayer listing once and exit out?

@Joehuu
Copy link
Member

Joehuu commented Sep 3, 2024

No, you have to be in MultiSpectatorScreen and wait until the MultiSpectatorPlayerLoaders push to MultiSpectatorPlayers (i.e. when you see gameplay in spectator). Also want to point out SoloSpectatorPlayer is unaffected by this.

@peppy
Copy link
Member

peppy commented Sep 3, 2024

Thanks

@peppy
Copy link
Member

peppy commented Sep 4, 2024

Able to reproduce. Definitely GC related.

Cycling carousel normally:

JetBrains Rider 2024-09-04 at 06 04 23

Cycling carousel after multiplayer spectator:

JetBrains Rider 2024-09-04 at 06 03 36

Comparing total genX sizes and object counts shows a large but not crippling difference (68.56mb -> 101.90mb managed / 553k -> 824k live objects). First thought was audio adjustments (each screen has muting stuff) so I attempted disabling that but it's still performing horribly.

Will require some further investigation.

@peppy
Copy link
Member

peppy commented Sep 5, 2024

@Joehuu can you try updating your .NET and reproducing on the latest HEAD? I can't seem to repro anymore...

@peppy
Copy link
Member

peppy commented Sep 5, 2024

Never mind, fix incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment