[nodejs] Unload entire module

2012-09-03 Thread Bradley Meck
How do people unload entire modules after they are done using them, we have some very long running apps we are trying to reduce the footprint on and unloading certain modules seems to be a good start. For example if we could eventually end up with something like: require.unload('nconf') after

Re: [nodejs] Unload entire module

2012-09-03 Thread Ben Noordhuis
On Mon, Sep 3, 2012 at 9:02 PM, Bradley Meck bradley.m...@gmail.com wrote: How do people unload entire modules after they are done using them, we have some very long running apps we are trying to reduce the footprint on and unloading certain modules seems to be a good start. For example if we

Re: [nodejs] Unload entire module

2012-09-03 Thread Marcel Laverdet
we have some very long running apps we are trying to reduce the footprint on and unloading certain modules seems to be a good start To be honest, that doesn't sound like a very good start. If your long applications have a growing footprint then you are leaking memory somewhere. Cleaning up

Re: [nodejs] Unload entire module

2012-09-03 Thread Scott González
On Mon, Sep 3, 2012 at 4:49 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: require.unload('nconf') after the configuration phase of startup. delete require.cache['nconf']? Wouldn't this get pretty tricky with dependency trees? -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Unload entire module

2012-09-03 Thread Rick Waldron
I'd be less worried about savings caps and more worried about losing implied references. I'm certainly interested in knowing how this works out for you. Rick On Mon, Sep 3, 2012 at 4:57 PM, Marcel Laverdet mar...@laverdet.com wrote: we have some very long running apps we are trying to reduce