Excessive memory usage

Bug #1320589 reported by mc0e
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
Status tracked in Pyqt
Pyqt
Fix Released
Medium
Damon Lynch

Bug Description

When downloading files, Rapid Photo Downloader loads the whole of each file into RAM as it goes. This is problematic when it hits a multi-gigabyte movie file.

Can things be changed such that RPD streams the content to a file in the target directory, or possibly does that just for files over some threshold size (say 50MB)?

Using mmap for the file is not as good, as it will still cause swapping.

Creating the file in the target directory minimises the work required to rename the file to the target file name.

There should be some cleanup mechanism for any left over files that might exist if a previous run has been interrupted.

Related branches

Revision history for this message
Damon Lynch (dlynch3) wrote :

When writing the program, it's true I didn't account for situations where video files wold be gigabytes in size. Patches to fix it are welcome.

One thing that cannot be changed writing the file directly into the target directory, avoiding a temporary directory. The program is designed to copy from multiple sources simultaneously into one destination. The only way I know of to do that safely is to write to a temporary file, then rename it.

A cleanup mechanism would be nice, but there are other higher priority features. However patches are welcome for this too.

Changed in rapid:
status: New → Confirmed
importance: Undecided → Medium
Damon Lynch (dlynch3)
Changed in rapid:
status: Confirmed → Fix Committed
assignee: nobody → Damon Lynch (dlynch3)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.