R
R
rink02018-06-19 18:42:02
Python
rink0, 2018-06-19 18:42:02

Parsing speed, the first time 5 minutes, the second time 1 minute, how so?

I have a parser, in short what it does: it parses pictures from the site and splits them into folders.
The execution time is very important to me (how quickly this script will be executed)
And now, running the first time, 8 folders were parsed in 5 minutes and 30 seconds, running the second time for about a minute. Probyval to clean the cache (in the command line ipconfig / flushdns) the result is the same 1 minute
How so?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dimonchik, 2018-06-19
@dimonchik2013

there is still a cache on the server
measure the connection speed separately, the folder layout separately

E
Evgen, 2018-06-19
@Verz1Lka

Maybe he does not download files again?
Scrapy, for example, has a mechanism in the image pipeline to avoid re-downloading non-outdated files.

X
xDimus, 2018-06-19
@xDimus

Clear the file cache, ipconfig /flushdns clears the cache of dns queries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question