Scrapy, a fast high-level web crawling & scraping framework for Python.
speed up consumption of spider start requests, while the engine has capacity to process them
Pablo Hoffmande0bf22010f6
diff --git a/scrapy/core/engine.py b/scrapy/core/engine.pyindex bd412bc89..e81816a05 100644--- a/scrapy/core/engine.py+++ b/scrapy/core/engine.py@@ -108,14 +108,16 @@ class ExecutionEngine(object):if not self._next_request(spider):break- if self.spider_is_idle(spider):- slot = self.slots[spider]+ slot = self.slots[spider]+ if slot.requests and not self._needs_backout(spider):try:request = slot.requests.next()self.crawl(request, spider)except StopIteration:- if slot.close_if_idle:- self._spider_idle(spider)+ slot.requests = None++ if self.spider_is_idle(spider) and slot.close_if_idle:+ self._spider_idle(spider)def _needs_backout(self, spider):slot = self.slots[spider]