Giter Site home page Giter Site logo

Comments (6)

ocharles avatar ocharles commented on June 2, 2024

Nice catch! I've been wanting to play with the new info table profiling in GHC 9.2, maybe I can figure out what's going on!

from reactive-banana.

ocharles avatar ocharles commented on June 2, 2024

Wow, info table profiling is amazing! The source of the leak is this line from switchP:

                Just new -> liftBuildP $ p2 `changeParent` new

Though the info table really points to

changeParent node parent =
    RW.tell $ BuildW (Deps.changeParent node parent, mempty, mempty, mempty)

Understanding why that causes a leak is a different matter... But I can at least say that changing this to Just new -> return () fixes the leak (but may also be changing behavior, I'm not entirely sure).

from reactive-banana.

ocharles avatar ocharles commented on June 2, 2024

This may be a duplicate of #152

from reactive-banana.

luke-clifton avatar luke-clifton commented on June 2, 2024

Hmm it looks the same yes. Though I thought I'd tried it with never, and not seen the growth. I'm double check that later.

from reactive-banana.

ocharles avatar ocharles commented on June 2, 2024

Yea, this is a bit different due to the event switching into itself. I really want to get this fixed, but it's surprisingly tricky! I'm hoping I can use ghc-debug to visualize the heap and understand who's keeping what alive.

from reactive-banana.

luke-clifton avatar luke-clifton commented on June 2, 2024

Just noticed you can comment out the reactimate and you still get the growth. (Which is perhaps a different bug?)

If I use never then I do see the growth with the reactimate and no growth without it.

from reactive-banana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.