carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

Lots of memory usage when uploading big video files #430

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Using a file-like object the content is full loaded in memory. This is really 
slow for big video files.

What is the expected output? What do you see instead?
More responsiveness and less memory usage

What version of the product are you using?
gdata 2.0.11

Please provide any additional information below.
Changing line 635 of gdata/youtube/service.py from:

    file_handle = StringIO.StringIO(filename_or_handle.read())

to:

    file_handle = filename_or_handle

fixes the problem.

Original issue reported on code.google.com by daniele....@gmail.com on 13 Aug 2010 at 12:07

GoogleCodeExporter commented 9 years ago
The StringIO was there for historical reasons that are no longer valid, so this 
is a great fix, thanks!  

Original comment by joe.gregorio@gmail.com on 16 Sep 2010 at 6:50