Hi there, it's me again.
Since the last time I asked about download large file streamly via OAuth2 , I eventually found there's possibly a bug in your code. I noticed an unnormal RAM usage which would even use up all RAM on old computers. This happens during the last few seconds of downloading a file (50+ MB).
And I found this is somethins related to this line:
|
self.body = response.text |
If changed to:
options = {'parse': 'text'}
options.update(opts)
if options['parse'] in ('text', 'query', 'json', ):
self.body = response.text
would solve this problem, and also lower the RAM usage during small size file downloading.
Hi there, it's me again.
Since the last time I asked about
download large file streamly via OAuth2, I eventually found there's possibly a bug in your code. I noticed an unnormal RAM usage which would even use up all RAM on old computers. This happens during the last few seconds of downloading a file (50+ MB).And I found this is somethins related to this line:
py-oauth2/pyoauth2/libs/response.py
Line 29 in 313f195
If changed to:
would solve this problem, and also lower the RAM usage during small size file downloading.