4 ms·
As a .NET developer I am a little envious of all the GC knobs that Java developers get to play with. If I could have only 1 new GC thing from Microsoft, it wou
by bob1029 5y ago
As a .NET developer I am a little envious of all the GC knobs that Java developers get to play with.
If I could have only 1 new GC thing from Microsoft, it would be the ability to totally disable GC during the lifetime of a process. I don't even want to be able to turn it back on.
I have a lot of scenarios where I could get away with the cruise missile approach to garbage collection. No reason to keep things tidy if the whole world is gonna get vaporized after whatever activity completes. Why waste cycles cleaning things up when you could be providing less jitter to your users or otherwise processing more things per unit time?
- google234123 5y agoIs the .net gc still contained in one gigantic source file?
- ixmerof 5y agoyup, exactly
- akshat_h 5y agoI haven't personally used this, but does this work? GC.TryStartNoGCRegion Method Attempts to disallow garbage collection during the execution of a critical path. https://docs.microsoft.com/en-us/dotnet/api/system.gc.trystartnogcregion?redirectedfrom=MSDN&view=net-6.0#overloads https://docs.microsoft.com/en-us/dotnet/api/system.gc.trysta...
- bob1029 5y agoPretty sure that is wired up like an elevator close button. Never seen it make a difference and not for lack of trying.