moaxcp / download-magic

Automatically exported from code.google.com/p/project-penny
0 stars 0 forks source link

improve db performance for DOWNLOADED and DOWNLOADTIME #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Everytime a download gets a buffer and saves it the db saves DOWNLOADED and 
DOWNLOAD_TIME. This slows things down considerably. It is possible to use a map 
to track the downloadtime and only update the db once per second or so. Since 
the DOWNLOADED will be updated when the application loads having that off is 
ok. And loosing some of the downloadtime on a crash should be ok.

1. Implement a map of downloads to times
2. on each save for download time check the time past and update both 
downloaded and time when wanted.

Original issue reported on code.google.com by moa...@gmail.com on 2 May 2012 at 12:17

GoogleCodeExporter commented 9 years ago

Original comment by moa...@gmail.com on 4 May 2012 at 12:39

GoogleCodeExporter commented 9 years ago
This increased download performance X 10!!! Now I just need to make the buffer 
larger.

Original comment by moa...@gmail.com on 6 May 2012 at 7:17