I believe there is no performance drop if you require a huge library and
only use a small part of it. I mean, code memory is a small part of the
total memory you use.
danmilon.
On 08/13/2012 01:02 PM, Osher E wrote:
Hi all
most modules have an entry point, which is by default index.js.
But what if my module does not have one entry point?
What if it is a colleciton of many small cross-project core utility
modules that i would not always want to load them all to use one of them?
I mean, by doing
var core = require('core').logger
we require whatever is exported on the entry-point of core, and use
only logger.
and there could be twenty of them, where in this project I just need
the logger here.
Please avoid the discussion of wither to wrap each utility as it's own
package...
Just assume that they do not justify that, but do need a package to
live in...
I saw somewhere that I should be able to
var core = require('core/logger')
and should be able to direct in my package.json that 'core/logger' is
actually available at ./lib/logger
only that now i cant find that place that sais how to do it...
Was I dreaming? Can anybody point it out for me? :)
Thanks
O.
--
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
--
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en