Quick update: I found the problem.

I was being a little clever with prototype inheritance.  I had a master 
instance of certain objects.  At the start of every game, I'd create a new 
class/function whose prototype pointed to said instance.  I set up ~6 of 
these ad hoc classes per game, and I called new on them maybe 20 times.  I 
figured that'd would be quick, but it ate a good chunk of my execution 
time.  I'm still not sure precisely why this ended up calling _chmod, but 
altering that code sped things up and caused _chmod to drop out of the 
profile.

Thanks for the help.

On Friday, March 16, 2012 9:11:25 PM UTC-4, Ben Noordhuis wrote:
>
> On Sat, Mar 17, 2012 at 02:04, Patrick Quinn wrote:
> > No, it doesn't.  I'm currently trying to find the problem by 
> progressively
> > rebuilding the application.  While I do that... is there anything in the
> > node.js runtime environment (no libraries) that could cause a program to
> > spend 10%-25% of its execution time in _chmod?
>
> Not in node.js itself, the core itself doesn't touch files, it only reads 
> them.
>
> Something you could try is to run your app through dtruss. It's a tool
> that logs syscalls, maybe it can tell what's getting chmod'ed.
>
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to