From 5028146e8c2dff20174089f73d54ee2d85e52fca Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Tue, 25 Nov 2008 00:39:11 +0000 Subject: [PATCH] added __slots__ to decrease memory footprint of Link objects --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40413 --- scrapy/trunk/scrapy/link/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scrapy/trunk/scrapy/link/__init__.py b/scrapy/trunk/scrapy/link/__init__.py index e80b20122..13ec4243d 100644 --- a/scrapy/trunk/scrapy/link/__init__.py +++ b/scrapy/trunk/scrapy/link/__init__.py @@ -77,6 +77,9 @@ class Link(object): Link objects represent an extracted link by the LinkExtractor. At the moment, it contains just the url and link text. """ + + __slots__ = 'url', 'text' + def __init__(self, url, text=''): self.url = url self.text = text