Live data from Hacker News

Unity's Mono problem: C# code runs slower than it should

marekfiser.com

41–50 of 190 posts

Re: Unity's Mono problem: C# code runs slower than it should

#41

Unity has a unity problem. While it’s easy to get in and make something (it’s got all the bells and whistles) it also suffers from the monolith problem (too many features, old code, tech debt). The asset store is gold but their tech feels less refined. It’s leaps and bounds where it was when it started but it still has this empty feel to it without heavy script modifications. There is the problem. The scripting endin…

Yeah, I started a project in Unity a while ago, and tried out Godot in the meantime.

Unity really feels like there should be a single correct way to do any specific thing you want, but actually it misses for your use case so you have to work around it, (and repeat this for every unity feature basically)

Godot on the other hand, really feels like you are being handed meaningful simple building blocks to make whatever you want.

Re: Unity's Mono problem: C# code runs slower than it should

#42
post #17

Earlier quoted context omitted.

Re. the editor speedup, it should outright eliminate the "domain reload" thingy that happens because all of the C# needs to be unloaded and reloaded in response to a change.

Pretty sure that will still be there? It'll be different because CoreCLR doesn't really have AppDomains but it will still need to unload old assemblies and reload them all again. That's the only reliable way to reset everything into a clean state.

AssemblyLoadContext.Unload https://learn.microsoft.com/en-us/dotnet/api/system.runtime....

Re: Unity's Mono problem: C# code runs slower than it should

#43

Unity has a unity problem. While it’s easy to get in and make something (it’s got all the bells and whistles) it also suffers from the monolith problem (too many features, old code, tech debt). The asset store is gold but their tech feels less refined. It’s leaps and bounds where it was when it started but it still has this empty feel to it without heavy script modifications. There is the problem. The scripting endin…

I think the major problem with Unity is they're just rudderless. They just continue to buy plugins and slap in random features but it's really just in service of more stickers on the box and not a wholistic plan.

They've tried and failed to make their own games and they just can't do it. That means they don't have the internal drive to push a new design forward. They don't know what it takes to make a game. They just listen to what people ask for in a vacuum and ship that.

A lot of talented people at Unity but I don't expect a big change any time soon.

Re: Unity's Mono problem: C# code runs slower than it should

#44
post #21
post #4

Will the move to CoreCLR give any speed ups in practice if the release build is complied with IL2CPP anyway? On all the games that I've worked on, IL2CPP is one of the first things that we've enabled, and the performance difference between the editor and release version is very noticeable.

Editor is slower than Mono release builds. You'll need to compare Mono release vs. IL2CPP release to see the actual difference.

I guess it would be good to also see a comparison between IL2CPP and Core CLR by the post author!

Re: Unity's Mono problem: C# code runs slower than it should

#45

Earlier quoted context omitted.

I don't like C++. It's very difficult to me, I generally stick to high level stuff , C#, JavaScript, Python, Dart, etc.

If you can code in C#, how is C++ difficult? Are pointers and the stl that difficult? Not denigrating, genuine question.

One word.

Headers.

That's just the start. The C++ build system and package managers are the stuff if nightmares. Modern languages are significantly easier to use.

Don't get me wrong, if you offer a job with a 200k base salary and give me 6 months to learn C++ I'll do it. But I won't enjoy it, and I definitely won't do it as a hobby.

Re: Unity's Mono problem: C# code runs slower than it should

#46
In general when game development comes up here I tend not to engage as professional gamedev is so different than what other people tend to deal with that it's hard to even get on the same page, but seeing as how this one is very directly dealing with my expertise I'll chime in.

There are few things off with the this post that essentially sound as someone more green when it comes to Unity development (no problem, we all start somewhere).

1. The stated approach of separating the simulation and presentation layers isn't all that uncommon, in fact it was the primary way of achieving performance in the past (though, you usually used C++, not C#).

2. Most games don't ship on the mono backend, but instead on il2cpp (it's hard to gauge how feasible that'd be from this post as it lacks details).

3. In modern Unity, if you want to achieve performance, you'd be better off taking the approach of utilizing the burst compiler and HPC#, especially with what appears to be happening in the in sample here as the job system will help tremendously.

4. Profiling the editor is always a fools errand, it's so much slower than even a debug build for obvious reasons.

Long story short, Unity devs are excited for the mentioned update, but it's for accessing modern language features, not particularly for any performance gains. Also, I've seen a lot of mention around GC through this comment section, and professional Unity projects tend to go out of their way to minimize these at runtime, or even sidestep entirely with unmanaged memory and DOTS.

Re: Unity's Mono problem: C# code runs slower than it should

#47

Unity has a unity problem. While it’s easy to get in and make something (it’s got all the bells and whistles) it also suffers from the monolith problem (too many features, old code, tech debt). The asset store is gold but their tech feels less refined. It’s leaps and bounds where it was when it started but it still has this empty feel to it without heavy script modifications. There is the problem. The scripting endin…

That last step is nonsensical: WebGPU is a shim layer that Vulkan-like layer (in the sense that WebGL is GLES-like) that allows you to use the native GPGPU-era APIs of your OS. On a "proper OS", your WebGPU is 1:1 translating all calls to Vulkan, and doing so pretty cheaply. On Windows, your browser will be doing this depending on GPU vendor: Nvidia continues to have not amazing Vulkan performance, even in cases wher…

I’m foreshadowing a future where they do. Please don’t kill the dream.

Re: Unity's Mono problem: C# code runs slower than it should

#48
post #43

Unity has a unity problem. While it’s easy to get in and make something (it’s got all the bells and whistles) it also suffers from the monolith problem (too many features, old code, tech debt). The asset store is gold but their tech feels less refined. It’s leaps and bounds where it was when it started but it still has this empty feel to it without heavy script modifications. There is the problem. The scripting endin…

I think the major problem with Unity is they're just rudderless. They just continue to buy plugins and slap in random features but it's really just in service of more stickers on the box and not a wholistic plan. They've tried and failed to make their own games and they just can't do it. That means they don't have the internal drive to push a new design forward. They don't know what it takes to make a game. They just…

The talent left ship years ago. The core engine’s graphics team is all that’s really left.

They also hired Jim Whitehurst as CEO after the previous CEO crapped the bed. Then Jim left as he just didn’t understand the business (he’s probably the one responsible for the “just grab it from the store” attitude). Now they have this stinking pile of legacy they can’t get rid of.

Re: Unity's Mono problem: C# code runs slower than it should

#49

Unity has a unity problem. While it’s easy to get in and make something (it’s got all the bells and whistles) it also suffers from the monolith problem (too many features, old code, tech debt). The asset store is gold but their tech feels less refined. It’s leaps and bounds where it was when it started but it still has this empty feel to it without heavy script modifications. There is the problem. The scripting endin…

Yeah, I started a project in Unity a while ago, and tried out Godot in the meantime. Unity really feels like there should be a single correct way to do any specific thing you want, but actually it misses for your use case so you have to work around it, (and repeat this for every unity feature basically) Godot on the other hand, really feels like you are being handed meaningful simple building blocks to make whatever…

Bingo. They don’t actually understand their users. Instead they’re the Roblox of game making, just provide the ability and let devs figure it out (and then sell it as a script).

Re: Unity's Mono problem: C# code runs slower than it should

#50
post #46

In general when game development comes up here I tend not to engage as professional gamedev is so different than what other people tend to deal with that it's hard to even get on the same page, but seeing as how this one is very directly dealing with my expertise I'll chime in. There are few things off with the this post that essentially sound as someone more green when it comes to Unity development (no problem, we a…

[flagged]
Post reply on HN