News for hackers. Stuff that matters.
Re:Locating CPU-intensive code in Node.js by cliftonk on Monday May 21, 2012 @10:53AM (#4003106)
Tip to make the stack traces better in javascript: name all of your anonymous functions.

For example,

    request.on('data', function requestReceivedData() { ... });
Re:Locating CPU-intensive code in Node.js by firefoxman1 on Monday May 21, 2012 @01:16PM (#4003819)
I've recently started doing this as well. You also get a performance boost if you define the functions once at the top and then do this:

   request.on('data', requestReceivedData)
Re:Locating CPU-intensive code in Node.js by klr on Monday May 21, 2012 @11:56AM (#4003427)
Really great. I'd like to do all that locally though.
Re:Locating CPU-intensive code in Node.js by htilford on Monday May 21, 2012 @02:14PM (#4004068)
by default nodetime reports back to nodetime.com to display the results. But that's just the default. It can be set to report to any server and/or the console.
Re:Locating CPU-intensive code in Node.js by grannyg00se on Monday May 21, 2012 @12:19PM (#4003527)
Is there some indication as to why you wouldn't be able to?
Re:Locating CPU-intensive code in Node.js by rektide on Monday May 21, 2012 @09:40PM (#4005851)
for the more DIY, hrtime.cputime() works great too.