I have several custom modules that I call hundreds of times per second and I want to make sure there isn't a performance impact due to calling these modules.
EXAMPLE MODULE - random-string.js
module.exports = function() { // Required modules var logs = require(__dirname + '/logs.js'); // Custom logger var uuid = require('node-uuid'); // Simple, fast generation of RFC4122 UUIDS var randomString = uuid.v1() + uuid.v4(); logs.dev(randomString); return randomString; }; If I am calling this module from another (ie. require(__dirname + '/random-string.js')) and it's being called hundreds of times per second, is this doing a read to disk EACH time to load logs.js or node-uuid?