P
P
PashaLynx2020-12-02 07:59:11
Python
PashaLynx, 2020-12-02 07:59:11

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

1 answer(s)
M
mkone112, 2020-12-02
@mkone112

Sounds like high algorithmic complexity. Probably somewhere you screwed up a lot with some cycles, or some other banality.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question