Comments (2)
so I audited the code and it looks like we are cleaning up heap snapshots at the time the HeapDiff object is garbage collected, but in your case, you're allocating a pile of HeapDiff objects in a tight loop. I want to confirm the diagnosis, and then maybe I can clean up snapshots in .end()
a little more proactively, so we don't blow rss through the roof, even in this kind of usage.
So I have a theory, and a possible fix. More in the morn'. Thanks for the report and testcase!
from node-memwatch.
should be fixed with 0.2.0 - I was indeed leaking one heap snapshot per heapdiff (!!). This was super lame. In addition to cleaning up, I now free sooner (in end() rather than waiting for the next gc) - so using heapdiff in a tight look should be just fine.
Integrated into your poisoned-stream.js
test case and I think you now get the kind of results you're looking for. I wonder if wrapping the program with a heapdiff (before you write to the stream to after it is flushed) will give you a meaningful picture of what's going on?
much <3
from node-memwatch.
Related Issues (20)
- can't install HOT 11
- OSX install fails HOT 14
- Support Node.js 4.x HOT 11
- memwatch-next doesn't build on node v5 HOT 8
- Incorrect License URL
- [discussion] [feature request] [help needed] Logging memory objects
- Module did not self register HOT 4
- Update release information in github HOT 1
- Cannot find module './build/Release/memwatch' HOT 1
- Can I use memwatch browser side?
- [SOLVED] npm install error HOT 16
- Install error HOT 5
- ubuntu install error HOT 4
- installing Memwatch HOT 6
- Where should I 'require' memwatch ?
- Is this dead? HOT 2
- Cannot install memwatch on MacOS HOT 6
- Can't install on Win 10 with newer version of Python
- Please mark as deprecated HOT 3
- win64/node 14.15.3 can not install as deprecated c code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-memwatch.