title: Python script slowing down over time
body: <p>I have a python 3 script, that is basically data scraper from an API. </p>
  
  <p>The code itself is working fine and the speed is spectacular, but it gets slower over time. </p>
  
  <p>I have no idea on how to go about finding why it get's slower. </p>
  
  <p>A simple outline of how it works is this: </p>
  
  <ol>
  <li>Script calls for an API dataset that is returned as JSON and converted to a list full with dictionaries. </li>
  <li>The dictionary list is looped trough and checked against multiple criteria.</li>
  <li>If match is found, a CSV file is opened and the result is written in there. </li>
  <li><p>After all the data have been tested against certainc riteria (with simple If statements) then all the data is recorded in a CSV file.   </p></li>
  <li><p>After CSV file contains more than 100 data points every time a new one comes in the last one is popped out. </p></li>
  <li><p>Repeat.</p></li>
  </ol>
  
  <p>Now all is fine, until the script has ran for about 24 hours. Then the loop speed will be around 32seconds per loop, and slowly it will keep increasing over time. </p>
  
  <p>My question is - what could cause this? and where do I look what could cause this. </p>
  
  <p>Please do let me know what additional info I need to provide if I've left out some paramount peace of info. </p>