{"action":"created","issue":{"url":"https://api.github.com/repos/puleos/object-hash/issues/39","repository_url":"https://api.github.com/repos/puleos/object-hash","labels_url":"https://api.github.com/repos/puleos/object-hash/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/puleos/object-hash/issues/39/comments","events_url":"https://api.github.com/repos/puleos/object-hash/issues/39/events","html_url":"https://github.com/puleos/object-hash/issues/39","id":187571111,"number":39,"title":"Object-hash leaking?","user":{"login":"d4vidi","id":9818880,"avatar_url":"https://avatars.githubusercontent.com/u/9818880?v=3","gravatar_id":"","url":"https://api.github.com/users/d4vidi","html_url":"https://github.com/d4vidi","followers_url":"https://api.github.com/users/d4vidi/followers","following_url":"https://api.github.com/users/d4vidi/following{/other_user}","gists_url":"https://api.github.com/users/d4vidi/gists{/gist_id}","starred_url":"https://api.github.com/users/d4vidi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4vidi/subscriptions","organizations_url":"https://api.github.com/users/d4vidi/orgs","repos_url":"https://api.github.com/users/d4vidi/repos","events_url":"https://api.github.com/users/d4vidi/events{/privacy}","received_events_url":"https://api.github.com/users/d4vidi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-06T16:16:33Z","updated_at":"2016-11-06T16:25:24Z","closed_at":null,"body":"Hello,\r\nsuspecting memory leaks, I ran the following test over object-hash:\r\n```javascript\r\nconst hash = require('object-hash');\r\nconsole.log(process.memoryUsage());\r\nwhile (true) {\r\n  const pre = Date.now();\r\n  for (let i = 0; i < 1000; i++) hash(data);\r\n  const post = Date.now();\r\n  console.log(process.memoryUsage(), \"runtime: \"+(post-pre)+\"ms\");\r\n}\r\n```\r\n\r\nThese were the results:\r\n```\r\n{ rss: 21213184, heapTotal: 10522624, heapUsed: 4672656 }\r\n{ rss: 85860352, heapTotal: 70365184, heapUsed: 38203144 } 'runtime: 329ms'\r\n{ rss: 118218752, heapTotal: 102469632, heapUsed: 79757256 } 'runtime: 325ms'\r\n{ rss: 151285760, heapTotal: 135122944, heapUsed: 112984104 } 'runtime: 443ms'\r\n{ rss: 178872320, heapTotal: 161873920, heapUsed: 126826120 } 'runtime: 513ms'\r\n{ rss: 206196736, heapTotal: 189136896, heapUsed: 165380888 } 'runtime: 553ms'\r\n{ rss: 244736000, heapTotal: 227192832, heapUsed: 189656008 } 'runtime: 664ms'\r\n{ rss: 272257024, heapTotal: 254455808, heapUsed: 224160496 } 'runtime: 738ms'\r\n{ rss: 315011072, heapTotal: 297373696, heapUsed: 263990928 } 'runtime: 812ms'\r\n{ rss: 342827008, heapTotal: 325685248, heapUsed: 294446712 } 'runtime: 885ms'\r\n{ rss: 370958336, heapTotal: 352948224, heapUsed: 315126088 } 'runtime: 991ms'\r\n{ rss: 399020032, heapTotal: 381259776, heapUsed: 341713960 } 'runtime: 1107ms'\r\n{ rss: 412856320, heapTotal: 395227136, heapUsed: 362916912 } 'runtime: 1422ms'\r\n{ rss: 440881152, heapTotal: 422490112, heapUsed: 384875336 } 'runtime: 1213ms'\r\n{ rss: 468836352, heapTotal: 450801664, heapUsed: 412514440 } 'runtime: 1328ms'\r\n{ rss: 496558080, heapTotal: 478064640, heapUsed: 445826144 } 'runtime: 1412ms'\r\n{ rss: 525045760, heapTotal: 506376192, heapUsed: 469118536 } 'runtime: 1499ms'\r\n{ rss: 553041920, heapTotal: 533639168, heapUsed: 498784816 } 'runtime: 1632ms'\r\n{ rss: 613945344, heapTotal: 594788352, heapUsed: 550526600 } 'runtime: 1754ms'\r\n{ rss: 641900544, heapTotal: 623099904, heapUsed: 575188672 } 'runtime: 1862ms'\r\n{ rss: 669708288, heapTotal: 650362880, heapUsed: 605594576 } 'runtime: 1967ms'\r\n{ rss: 697405440, heapTotal: 677625856, heapUsed: 641817448 } 'runtime: 2096ms'\r\n^C\r\n```\r\n\r\nSeems like the there are serious leak issues. Could you advise?\r\nDo note that I've tried all versions 1.1.0 - 1.1.4 (inclusive).\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/puleos/object-hash/issues/comments/258691853","html_url":"https://github.com/puleos/object-hash/issues/39#issuecomment-258691853","issue_url":"https://api.github.com/repos/puleos/object-hash/issues/39","id":258691853,"user":{"login":"d4vidi","id":9818880,"avatar_url":"https://avatars.githubusercontent.com/u/9818880?v=3","gravatar_id":"","url":"https://api.github.com/users/d4vidi","html_url":"https://github.com/d4vidi","followers_url":"https://api.github.com/users/d4vidi/followers","following_url":"https://api.github.com/users/d4vidi/following{/other_user}","gists_url":"https://api.github.com/users/d4vidi/gists{/gist_id}","starred_url":"https://api.github.com/users/d4vidi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4vidi/subscriptions","organizations_url":"https://api.github.com/users/d4vidi/orgs","repos_url":"https://api.github.com/users/d4vidi/repos","events_url":"https://api.github.com/users/d4vidi/events{/privacy}","received_events_url":"https://api.github.com/users/d4vidi/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T16:25:24Z","updated_at":"2016-11-06T16:25:24Z","body":"Sure. `data` is in fact a gibberish object that I created:\r\n```\r\nconst data = {\r\n  data_arr: [\r\n    {\r\n      name: \"wegierngheirh\",\r\n      desc: \"wergiojwegho\",\r\n      phone: 3253246346\r\n    },\r\n    {\r\n      name: \"Weg24g24\",\r\n      desc: \"r0-u3-t23t\",\r\n      phone: 1111\r\n    }\r\n  ],\r\n  globalValue: 124135,\r\n  moreContent: {\r\n    withSubStuff: \"wet9h23t92-23t-23t0=gj243g0j\"\r\n  }\r\n}\r\n```\r\n\r\n**But it is really irrelevant:** This problem will also be introduced even if you set `data={}`\r\n"}}
{"actor":{"display_login":"d4vidi"}}