Answer the question
In order to leave comments, you need to log in
Why does a python script slow down over time?
Hello, I am new to python. I wrote a script that pulls data from yahoo finance and fills the database with them. The input is a list of company tickers. But here's the trouble - when more than 16 shares are processed at a time, the script starts to increase the load on the processor, for 50-60 shares the processor is generally hammered under 100, which is why the processing of one company increases from 2 minutes to half an hour. There is a way out - to launch no more than 15-20 shares at a time, but I want to understand what I'm doing wrong, maybe I don't know what. I close all connections with a DB after one cycle (processing of one action).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question