On Fri, Sep 4, 2009 at 1:11 PM, Chris Withers<chris at simplistix.co.uk> wrote: > Am I right in reading this as most of the time is being spent in httplib's > HTTPResponse._read_chunked and none of the methods it calls? > > If so, is there a better way that a bunch of print statements to find where > in that method the time is being spent? Well, since the source for _read_chunked includes the comment # XXX This accumulates chunks by repeated string concatenation, # which is not efficient as the number or size of chunks gets big. you might gain some speed improvement with minimal effort by gathering the read data chunks into a list and then returning "".join(chunks) at the end. Schiavo Simon
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4