If the time is exponentially increasing, it could be an indication that 
each iteration is adding event handlers and that old event handlers from 
previous iterations are being inadvertently fired. As zladuric mentions, 
you'll want to use a debugger or logging to get some insight into what your 
program is doing that you don't expect.

Personally, I like https://github.com/node-inspector/node-inspector. I 
would put a breakpoint or some logging at key points in the program 
(especially expensive event handlers) and ensure they're when I expect & 
the number of times I expect, especially in subsequent runs of the program.

If you find that your program's execution is running as expected, then it 
could be a memory leak, causing a bunch of objects to get built up, which 
makes the garbage collection sweeps take an inordinate amount of time. 
Unfortunately, node-inspector doesn't have profiling built-in yet, but you 
could use https://github.com/c4milo/node-webkit-agent or Memwatch/heapdump 
<https://github.com/bnoordhuis/node-heapdump> or StrongLoop's profiling 
tools <https://strongloop.com/node-js/devops-tools/> or other solutions 
linked to in Will Villanueva's node.js profiling guide 
<http://www.willvillanueva.com/the-node-js-profiling-guide-that-hasnt-existed-profiling-node-js-applications-part-1/>
.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/20b20161-43c4-47dd-863c-bdaef18474c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to