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

Migrate to .NET 9 #198

Merged
merged 13 commits into from
Dec 20, 2024
Merged

Migrate to .NET 9 #198

merged 13 commits into from
Dec 20, 2024

Conversation

marco-carvalho
Copy link
Contributor

No description provided.

@github-actions github-actions bot added audio Affects Audio playback during emulation cpu An issue with ARMeilleure, the JIT, or Hypervisor gpu Affects GPU emulation graphics-backend:opengl Affects the OpenGL Graphics backend graphics-backend:vulkan Affects the Vulkan Graphics backend gui Affects the Avalonia UI or translations. horizon Affects the Horizon OS HLE components. labels Nov 6, 2024
@WilliamWsyHK
Copy link
Contributor

We should only merge this once .NET 9 has been released globally out of RC, and the version of the global.json is update again to match latest release version.

Meanwhile, we need more people to test and see what has happened, e.g. performance regression/broken game functionality.

@GreemDev
Copy link
Member

GreemDev commented Nov 7, 2024

We should only merge this once .NET 9 has been released globally out of RC, and the version of the global.json is update again to match latest release version.

Pretty sure that's why this was opened as a draft.

@marco-carvalho
Copy link
Contributor Author

I opened this as a draft precisely because .NET 9 is still in RC; I’ll update the global.json to the latest release version once .NET 9 is officially out. Meanwhile, I’ll encourage additional testing to check for any performance regressions or broken functionality.

@marco-carvalho marco-carvalho marked this pull request as ready for review November 13, 2024 01:42
@bangfire
Copy link
Contributor

There's some low hanging fruit you could probably add to this PR such as the new Lock object: https://learn.microsoft.com/en-us/dotnet/api/system.threading.lock?view=net-9.0

A quick find replace on object _lock has a a lot of hits that are free to update.

@mattzink
Copy link

mattzink commented Nov 13, 2024

Those warnings about Lock being upcast to object will result in runtime failures. You need to update the method signatures to Lock as well when you pass instances around.

@LukeWarnut
Copy link
Contributor

LGTM. Seems to give a 1% FPS increase on my setup.

@mattzink
Copy link

mattzink commented Dec 3, 2024

I think all runtime synchronized packages (System.IO.Hashing and System.Managment) should be updated to 9.0.0 as well.

@LukeWarnut
Copy link
Contributor

LukeWarnut commented Dec 3, 2024

Improves performance in pretty much every game on my machine (i7-13620H, RTX 4070)

Super Mario Odyssey: +4.2 FPS
The Legend of Zelda: Echoes of Wisdom: +0.6 FPS
Mario Party Superstars +5.3 FPS
Balatro: +2.2 FPS
Minecraft: NSW Edition: +13.7 FPS

@ViRb3
Copy link

ViRb3 commented Dec 3, 2024

@marco-carvalho do you have any reference for "Linq.Any/Linq.FirstOrDefault are now faster than List.Exists/List.Find"? I tried to search but didn't find any existing article or benchmark.

On another note, just came across an article claiming ToArray is now always faster than ToList. Some instances can be changed in the code.

@marco-carvalho
Copy link
Contributor Author

@ViRb3
SonarSource/sonar-dotnet#9664
SonarSource/sonar-dotnet#9665

@JWatersMeet
Copy link

FPS uplift from 86.5 to 93.4 on Densha de Go Stage Select screen with .NET 9 with frame rates unlocked on my system. I haven't found any issues in my library with this patch.

@legluondunet
Copy link

legluondunet commented Dec 16, 2024

Will this changes break Linux compatibility?

@Daenorth
Copy link
Contributor

Gives me around 10-15 more FPS in general Areas on Pokemon Violet - Don't see any regression or issues thus far.
Seems to stay more stable at higher FPS - drops down less in general. (Canary can drop down all the way to 80-85 in some areas. Net9 drops down to 98-105 at most)

@GreemDev
Copy link
Member

Will this changes break Linux compatibility?

Uh, no? This PR even has linux builds available. What are you talking about?

@GreemDev
Copy link
Member

What's the status on this? Is it ready for merge or are you still looking for ways to apply the new features?

@marco-carvalho
Copy link
Contributor Author

It is ready for merge since I removed the “draft” status.

@GreemDev GreemDev merged commit ff66281 into Ryubing:master Dec 20, 2024
10 checks passed
marco-carvalho added a commit to marco-carvalho/Ryujinx that referenced this pull request Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Affects Audio playback during emulation cpu An issue with ARMeilleure, the JIT, or Hypervisor gpu Affects GPU emulation graphics-backend:opengl Affects the OpenGL Graphics backend graphics-backend:vulkan Affects the Vulkan Graphics backend gui Affects the Avalonia UI or translations. horizon Affects the Horizon OS HLE components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants