title: Lazy loading in node.js
body: <p>I was wondering if using <code>require()</code> in node.js was the equivalent to lazy loading?</p>
  
  <p>For example if I had a function that required a specific node.js package that wasn't needed anywhere else in my code am I best to use <code>require()</code> inside of that function to include the needed package only when that function is called.</p>
  
  <p>I'm also unsure if this will provide any performance improvements given my lack of understanding around the node.js architecture? I presume it will use less memory per connection to my server. However will it increase I/O to the disk when it has to read the package, or will this be a one off to get it in memory?</p>
  
  <p>If this is the case how far should I take this, should I be trying to write node.js packages for as much code as I can?</p>