Omar
Omar
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Yep, because startup of even a trivial app was taking more than two seconds. Profiling my own app, in its short-run case, takes just as long.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
It'll probably be another 6 months before we have a chance at upgrading the fleet, but I have a few things to try until then so thanks for that.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
AOT is fast enough, but it would only help for about 30% of our fleet.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
native aot doesn't work on my primary OS. I mentioned this above.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Yep, 75 ms. It's almost twice that.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
to my standards?
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
I'm wondering if the industry is in decline because people expect bad performance, and expect that very common platforms are unsupported.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
The problem is that there's a significant cost to starting up a dotnet app. Sorry, I thought I had made that clear before. Maybe another problem is that you're apathetic to the issue.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Maybe you wouldn't, but I don't see how that addresses this problem.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Shell script?
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Sure, if refactoring large systems was free, we'd already have done that. Fact is, we're in the midst of rearchitecting a large legacy system. Maybe one day it'll be a full-blown service, but until then we run a process against available input in batches.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
I thiiiiink I've done the math right, but we'd need it to be less than 75 milliseconds to not be an issue.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
I think the service script is spawning dotnet run, so it'll certainly help to directly run the image. The startup time is still a bit of a concern.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
I'm not normally ocncerned iwth startup, but when it's so long that it dominates processing time on a small workloads. In actuality, I have a system that runs on some input. Beforehand, we don't know if the input is large or small. If it's large, great -- a 2-seconds startup doesn't matter much becuase processing takes a while. If it's small, then processing takes far less time than startup and we actually end up falling behind.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Yep, since 1985.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
So, it's expected that it's slow, and tough shit if you don't like it? It's like the software industry is giving up on itself.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
What other disappointments are "expected"?
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Expected to be slow? LOL
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Oh, good catch. with --no-build it is "only" 1775 milliseconds.
100 replies
CC#
Created by Omar on 9/3/2023 in #help
❔ Why is C# so slow on Linux? How can I speed it up?
Are you sure? On 64-bit Intel, it's even slower!
mike@barney:~/hello$ time dotnet run
Hello, World!

real 0m5.952s
user 0m7.891s
sys 0m0.623s
mike@barney:~/hello$ uname -a
Linux barney 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
mike@barney:~/hello$ time dotnet run
Hello, World!

real 0m5.952s
user 0m7.891s
sys 0m0.623s
mike@barney:~/hello$ uname -a
Linux barney 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
100 replies