-
Notifications
You must be signed in to change notification settings - Fork 71
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
Perform evaluation steps Network
using GraphGC
#268
Conversation
… as it had evolved into a boilerplate module.
Alas, it appears that the event log for Ollie's example of #261 (comment) still shows the presence of a space leak. 🤔 Needs more work. Eventually, the right thing to do is to include a few tests in the test suite that can detect certain space leaks. 🤓 In other words — instead of checking for space leaks manually, we should automate checking for them. That said, the new tests do show that garbage collection on |
Actually, setting
results in the following heap profile: The program completes very quickly and runs in constant size. 🤔 However! Compiling the program with |
I have added a function Twist: The test will pass when I set |
Getting closer. I have added a test case that works on the Observation: If I remove Observation 2: The |
Output in `graphviz` format
I have added a debugging utility For the failing Apparently, dereferencing the weak pointers will yield |
`tryReadTQueue` returns a single element, wrapped in `Maybe`. Due to the (new) polymorphism of `mapM_`, I did not notice that the result is a single element and not a list.
Finally, fixed it! 🥳 Turns out that I was accidentally relying on |
Hm, the space profile for #261 is still not constant, but the leak is not in the network graph, at least. 🤔 |
I found the culprit for the remaining space leak: In the function reactive-banana/reactive-banana/src/Reactive/Banana/Prim/Low/Graph.hs Lines 179 to 180 in 4aa23ea
Here is the space profile after fixing this: 🥳 |
Overview
This pull request completely changes the way that dependencies between
Pulse
are tracked and used in order to perform anEvaluation.step
for aNetwork
.We use the machinery provided by
GraphGC
toPulse
, usinginsertEdge
andclearPredecessors
.Pulse
in dependency order with early exit, usingwalkSuccessors_
.Comments
Pulse
, specifically Memory leak with dynamic behavior switching #261Pulse
, we may have to look at garbage collection andVault
.Latch
.Still, 🥳!
Obsoletes