-
The following things are happening with the code below: the crawler is collecting data slowly and memory usage is increasing. I would like to know how to optimize it.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @ycq0125! I noticed that you're making a new |
Beta Was this translation helpful? Give feedback.
Hi @ycq0125! I noticed that you're making a new
BeautifulSoupCrawler
instance for each crawled host. Is there any chance you could reuse the same instance? Also, if you want to ingest requests from Redis, perhaps you could implement that as aRequestLoader
orRequestManager
(former if you just want to read from Redis, latter if you also want Redis to handle retries and additional links).