GithubHelp home page GithubHelp logo

Comments (7)

AndreasMadsen avatar AndreasMadsen commented on September 20, 2024

There doesn't appear to be any memory leaks, but there is an odd behaviour in the RSS part which usually comes from new Buffer allocations. I have no idea what it is about, trace doesn't change the behaviour of node in any of those areas.

baseline
no-trace

with trace
with-trace

from trace.

julien-f avatar julien-f commented on September 20, 2024

Side question: which tool are you using to analyse memory usage in Node?

from trace.

AndreasMadsen avatar AndreasMadsen commented on September 20, 2024

I just wrote something simple: 7e5496a

maybe I will make a real module some day :D

from trace.

AndreasMadsen avatar AndreasMadsen commented on September 20, 2024

7b91e4a should fix this. If you try it out (please do) be aware that you will need at least node version 5.2.0 for now. However I have been promised that the necessary node features will land soon in 4.x.

from trace.

AndreasMadsen avatar AndreasMadsen commented on September 20, 2024

I don't get why this is an issue. I suspect it might be a v8 bug in the gc, 7b91e4a basically just moved the stack object into an id-map and does the memory management itself. For future reference I also tried using a WeekMap, so I din't have to use the gc destroy event, there was an improvement but not enough.

WeakMap using handle object
4-weak-map

Map using uid and destructor event
5-fix

from trace.

AndreasMadsen avatar AndreasMadsen commented on September 20, 2024

Thanks for creating the issue. I really appreciate the time you use on trace and stack-chain 👍

from trace.

julien-f avatar julien-f commented on September 20, 2024

Glad to help.

Thanks for your work :)

from trace.

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.