title: Does import manager really speed up performance in python?
body: <p>I found a code in a <a href="https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/discum.py" rel="nofollow noreferrer">library</a>, where the code has the following pattern:</p>
  <pre><code>imports = Imports(
      {
          &quot;Wrapper&quot;: &quot;discum.RESTapiwrap&quot;,
          &quot;Login&quot;: &quot;discum.start.login&quot;,
          &quot;SuperProperties&quot;: &quot;discum.start.superproperties&quot;,
          ...
      }
  )
  </code></pre>
  <p>and the comment says <code># to speed up importing discum &amp; only import modules when they are needed</code></p>
  <p>Each call to function is wrapped as</p>
  <pre><code>def getGatewayUrl(self):
      return imports.Other(self.s, self.discord, self.log).getGatewayUrl()
  </code></pre>
  <p>The question is: does this really affect performance, making the code <strong>faster</strong>? IMHO it is wrong, because when you start the interpreter it 'loads' all the functions, etc, so then it knows where to search for the object. In that case the interpreted does the same, but there is overhead, which the <code>return imports.something(...)...</code> does</p>