optimized session::add_torrent() by putting more info in torrent_info, to make it possible to reproduce the exact info section from an torrent_info object. The result is that the .torrent file is only parsed once.

This commit is contained in:
Arvid Norberg
2005-10-16 16:58:41 +00:00
parent f770d1438d
commit f63702c964
15 changed files with 117 additions and 74 deletions

View File

@@ -651,9 +651,9 @@ namespace libtorrent
assert(num_blocks > 0);
#ifdef TORRENT_VERBOSE_LOGGING
std::ofstream f("piece_picker.log", std::ios_base::app);
f << "backup_blocks: " << backup_blocks.size() << "\n"
<< "used: " << std::min(num_blocks, (int)backup_blocks.size()) << "\n----\n";
// std::ofstream f("piece_picker.log", std::ios_base::app);
// f << "backup_blocks: " << backup_blocks.size() << "\n"
// << "used: " << std::min(num_blocks, (int)backup_blocks.size()) << "\n----\n";
#endif
interesting_blocks.insert(interesting_blocks.end()