MaxMath icon indicating copy to clipboard operation
MaxMath copied to clipboard

(Backlink) Extreme memory usage with MaxMath in Rider

Open CodeSmile-0000011110110111 opened this issue 1 year ago • 3 comments

Link to Youtrack issue

No action needed. I thought I'll post this here for reference in case another Rider user runs into this high memory usage issue. For the time being I removed MaxMath from my project. Specifically the file Impl.cs seems to be where Rider analysis got stuck.

Interesting, thank you. Impl.cs is almost 6.000 lines of code, which is not a lot when compared to some 4-element vector types. It might be a hickup with ReSharper detecting that the default case of a switch statement on a byte with all 256 cases being covered is unreachable, although omitting it would result in a syntax error, unfortunately.

Once some issues are resolved, I will distribute a DLL alongside the source code with each release, which will probably do the trick for rider users (maybe try that one?) ;)

MrUnbelievable92 avatar Sep 02 '22 18:09 MrUnbelievable92

@MrUnbelievable92 Please consider suggesting to use this package from github instead of suggesting to use "Local package" in the read.me.

Link those packages from github in the manifest.json:

    "maxmath":"https://github.com/MrUnbelievable92/MaxMath.git",
    "csharpdevtools":"https://github.com/MrUnbelievable92/C-Sharp-Dev-Tools.git",

https://youtrack.jetbrains.com/issue/RSRP-489925/Extremely-high-memory-usage-of-RiderBackend-in-Unity-project-with-MaxMath-package-installed#focus=Comments-27-6447641.0-0

van800 avatar Sep 16 '22 07:09 van800

I've been having cpu usage issues ever since using maxmath in Visual Studio. No idea the cause but I'll update if I do find anything useful. Edit: Watching task manager I see VS shoot up to 70%+ CPU usage with ServiceHub.RoslynCodeAnalysisService.exe being the subprocess taking the most of it. It seems to only be an issue when working inside the maxmath assembly (and yeah, opening Impl.cs caused VS to crash).

chadefranklin avatar Oct 03 '22 06:10 chadefranklin