aardvark-platform / aardvark.base

Aardvark.Base is the foundation of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
https://aardvarkians.com/
Apache License 2.0
153 stars 9 forks source link

Hilite GC Stalls #12

Closed krauthaufen closed 9 years ago

krauthaufen commented 9 years ago

Garbage collector stalls in Hilite take forever (minutes to hours) and are most likely related to Ag/Incremental stuff.

krauthaufen commented 9 years ago

According to http://reedcopsey.com/2009/07/08/systemweakreference-internals-and-side-effects/ weakreferences have a significant performance impact when used extensively...

This is caused by the fact, that upon garbage collection the GC must scan all weakreferences in order to determine if they are still valid. If an invalid weakref is found its internal pointer is set to null... Since we use a bazillion of these this will definitely hit us...

Our incremental system massively relies on that construct so maybe we could find a better way of dealing with mods/etc going out of scope... When replaced by strong references the inputs will force the existence of outputs and vice versa...

On the good side there would not be a significant performance penalty ....

luithefirst commented 9 years ago

Bug in GC:

http://blogs.msdn.com/b/maoni/archive/2015/08/12/gen2-free-list-changes-in-clr-4-6-gc.aspx

Fixed after installing hotfix KB3088956