title: cProfile taking a very long time
body: <p>I am starting to use <code>cProfile</code> to profile my python script.
  I have noticed something very weird.</p>
  
  <p>When I use <code>time</code> to measure the running time of my script it takes 4.3 seconds.</p>
  
  <p>When I use <code>python -m cProfile script.py</code> it takes 7.3 seconds.</p>
  
  <p>When running the profiler within the code:</p>
  
  <pre><code>import profile
  profile.run('main()')
  </code></pre>
  
  <p>it takes 63 seconds!!</p>
  
  <p>I can understand why it might take a little more time when adding profiling, but why there is such a difference between using <code>cProfile</code> from outside or as part of the code? 
  Is there a reason why it takes so much time when I use <code>profile.run</code>?</p>