-
Notifications
You must be signed in to change notification settings - Fork 18
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
AltCover.prepare uses GB of RAM #56
Comments
The changes between 5.0.665 and 5.2.667 have been peripheral, mostly API related, so I would not expect any noticeable change in the behaviour of the main instrumentation and reporting stages. The easy wins in memory reduction were part of the 4.0.659 release; currently the big items in memory will be the XML report, and a sequence point to visit count dictionary (plus any tracking data from the --callContext option, which has the biggest potential to bloat the data). How large is your project? One useful measure would be the size of the XML report file generated in the instrumentation phase, and memory use will scale with that size. |
The last successfully generated xml report was 111kb. |
Interesting. That's quite small. By comparison, the AltCover self-test (instrumenting and running its own unit tests) generates a 2Mb XML report (for 4400 coverable code points), and yet the AltCover runner stage only consumes a few 10s of Mb memory with I think that gives me a first place to start instrumenting for memory use, though. |
Scratch that -- I suddenly notice the What's in memory in the prepare phase are the XML report and Cecil representations of the assemblies being modified; nothing's been visited yet, so the Again, the self-test doesn't spike significantly in memory at any point. This gives me a different place to start looking, though. |
After some investigation of the If there are "enough" assemblies being instrumented, working under Server GC would be one possible mechanism for leaving unrecycled memory in process. |
I just had an instance of this behaviour, though that was after updating a sample program to FSharp.Core 4.7; though that one looked like an unterminated recursion. |
The latest build of master resolves the specific memory grabbing I was seeing, which was related to branch coverage of a loop -- not 4.7 compilation specific, but due to the way some of the library code had changed between releases. It wouldn't hurt to give this build a try if you are still seeing this issue. |
Release 5.3.688 has the fix for the issue I found. Does this resolve your issue? |
Hello Steve
after expanding my FSharp Project a bit generating the CodeCoverage Report now takes up all the system memory it can get. My System has 8GB Ram and after taking up 7 GB I killed the process. Even with the
--single
flag specified the memory consumption does not reduce. I use the newest Version of AltCover 5.2.667 but I also had the same Problem with Version 5.2.665.The last build that didn't run that long(using 5.2.665.) was before I added Records with Interfaces and DUs plus Interfaces.
I would have thought that this would be a standard Fsharp style programm.
I excluded xunit and Moq.
Is there another way of reducing the memory usage?
The text was updated successfully, but these errors were encountered: