Comments (7)
Awesome, I've been pushing on more ported js code here https://github.com/mapbox/carmen-cache/tree/spatialmatch if you want to keep being my guardian angel : )
from carmen-cache.
@springmeyer if you have a chance tonight would love your gut reaction to the memleak going on in spatialmatch-memtest
branch:
https://github.com/mapbox/carmen-cache/blob/spatialmatch-memtest/test/spatialMatch.test.js
I'm probably doing something n00bishly horrible : (
from carmen-cache.
@yhahn - does not look like a memory leak. I see the constant growth of memory until the test ends, however it looks like its just because garbage collection is not kicking in. I have this hunch because memory stays constant for me at ~180 MB if I do:
node --expose-gc ./node_modules/.bin/tape test/spatialMatch.test.js
With:
diff --git a/test/spatialMatch.test.js b/test/spatialMatch.test.js
index f5222e7..b682e80 100644
--- a/test/spatialMatch.test.js
+++ b/test/spatialMatch.test.js
@@ -22,6 +22,7 @@ for (var i = 0; i < 10000; i++) test('unit ' + i, function(assert) {
var args = require('./fixtures/spatialMatch-args.json');
spatialMatch(args[0], args[1], args[2], args[3], function(err, ret) {
firstRun = firstRun || process.memoryUsage();
+ gc();
assert.ifError(err);
assert.deepEqual(ret, require('./fixtures/spatialMatch-ret.json'));
assert.end();
from carmen-cache.
So, we may need to start using NanAdjustExternalMemory
(which calls out to v8::AdjustAmountOfExternalAllocatedMemory
) to give V8 a hint that carmen-cache is using memory so that garbage collection is triggered more often.
from carmen-cache.
Hrm, seeing in actual testcases that gc is not making a difference -- cache definitely seems to be eating more memory and getting progressively slower for the same operations.
Will dig a bit more.
from carmen-cache.
Hmm, okay, so must be something else going on that the simple testcase did not cover?
from carmen-cache.
capturing chat: we found the mini-memleak: 376c994
from carmen-cache.
Related Issues (20)
- [setgrid] Add unit tests for _set() with grid objects HOT 1
- [setgrid] Add an encodeGrid() cpp method HOT 1
- [setgrid] Wire up encodeGrid() and _set() HOT 1
- [setgrid] Building dev binaries HOT 1
- Flapping test failures in asan travis job HOT 1
- Refactor Plan HOT 9
- Refactor followup: enable LTO HOT 7
- Use `-Werror` and `-isystem` HOT 3
- Speed up sorting / reduce overhead of sorting HOT 1
- Illegal instruction on Node 8 HOT 3
- Documenting most recent bottlenecks detected HOT 3
- Don't publish binaries for git tags HOT 2
- Update scoredist implementation
- Refactor coalesce to reduce duplicate get operations
- Review Travis CI and Warning options.
- Place of binary
- Use `numeric_cast` for narrowing conversions HOT 2
- Update RocksDB: 4.13 -> 5 HOT 4
- Upstream: undo feature id sharding HOT 3
- [setgrid] Set Grid Quest 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 carmen-cache.