Jump to content

Store cached torrent files differently, resulting in better load times


Recommended Posts

Storing them as individual files causes load times to get slower and slower as you eventually need hundreds of file accesses (or more) to load utorrent. Is it possible to just store them in a client side DB like SQLite, or something custom? This would boost load times across the board (more so for users that have anti-virus programs like AVG that are kind of intense about checking all file accesses and users with thousands of torrent files)

Why keep thousands of files? so you know which ones you've already downloaded because utorrent warns you it's in the list.

All in all this should be a super easy to add feature because instead of reading files, you're just reading another type of database. File systems qualify as a minimal database so the conversion with properly weakly coupled code should be easy but I don't know how you've actually programmed utorrent.

Link to comment
Share on other sites

  • 3 weeks later...

Coincidentally, I was playing with MyDefrag yesterday and came up with the script below, which will gather everything in its subtree. It makes reading lots of files out of that subtree much faster. Maybe it will help here.

Description("Localize (defrag and gather) the entire contents of !ScriptDirectory!. Needs a relatively well-maintained disk, as it will gather the files into available space and not move anything else around to make room.")
Title("Clean up !scriptdirectory! after install")
Writable(yes) and Fixed(yes) # Don't see how to make MyDefrag derive volume from path
FileSelect fullpath('!ScriptDirectory!\*','*.MyD') fileactions fileend
FileSelect not(fullpath('!ScriptDirectory!\*','*')) fileactions fileend
size(0,40000000) # anything larger we can just defrag, avoiding even a long seek for a >500ms read doesn't seem worth it
FileSelect all fileactions defragment() fileend

Link to comment
Share on other sites

SQLite can be a solution (if possible) like storing cookies, history, passwords etc... in Firefox.

But huge SQLite db are problematic too. In the case of Firefox, when the history base (places.sqlite) becomes huge (several dozens of MB), the browser is really slowed down and takes some time to start.

Of course, the advantage is you merge all the .torrents into one file.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...