From 3841ddd3dc8f8f511ef454ae2881e5a0daa1fc02 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 4 Oct 2007 00:07:26 +0000 Subject: [PATCH] moved block_downloading_alert, block_finished_alert and piece_finished_alert to debug level...yay performance --- libtorrent/include/libtorrent/alert_types.hpp | 6 +++--- libtorrent/src/disk_io_thread.cpp | 1 - libtorrent/src/peer_connection.cpp | 4 ++-- libtorrent/src/torrent.cpp | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libtorrent/include/libtorrent/alert_types.hpp b/libtorrent/include/libtorrent/alert_types.hpp index bfbfa8ae4..2f1998aae 100755 --- a/libtorrent/include/libtorrent/alert_types.hpp +++ b/libtorrent/include/libtorrent/alert_types.hpp @@ -191,7 +191,7 @@ namespace libtorrent const torrent_handle& h , int piece_num , const std::string& msg) - : torrent_alert(h, alert::warning, msg) + : torrent_alert(h, alert::debug, msg) , piece_index(piece_num) { assert(piece_index >= 0);} @@ -208,7 +208,7 @@ namespace libtorrent , int block_num , int piece_num , const std::string& msg) - : torrent_alert(h, alert::warning, msg) + : torrent_alert(h, alert::debug, msg) , block_index(block_num) , piece_index(piece_num) { assert(block_index >= 0 && piece_index >= 0);} @@ -228,7 +228,7 @@ namespace libtorrent , int block_num , int piece_num , const std::string& msg) - : torrent_alert(h, alert::warning, msg) + : torrent_alert(h, alert::debug, msg) , peer_speedmsg(speedmsg) , block_index(block_num) , piece_index(piece_num) diff --git a/libtorrent/src/disk_io_thread.cpp b/libtorrent/src/disk_io_thread.cpp index 112e76927..ea177b58d 100644 --- a/libtorrent/src/disk_io_thread.cpp +++ b/libtorrent/src/disk_io_thread.cpp @@ -314,4 +314,3 @@ namespace libtorrent } } - diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp index 209833de5..83f1d32f7 100755 --- a/libtorrent/src/peer_connection.cpp +++ b/libtorrent/src/peer_connection.cpp @@ -1402,7 +1402,7 @@ namespace libtorrent assert(p.start == j.offset); piece_block block_finished(p.piece, p.start / t->block_size()); picker.mark_as_finished(block_finished, peer_info_struct()); - if (t->alerts().should_post(alert::info)) + if (t->alerts().should_post(alert::debug)) { t->alerts().post_alert(block_finished_alert(t->get_handle(), block_finished.block_index, block_finished.piece_index, "block finished")); @@ -1680,7 +1680,7 @@ namespace libtorrent if (!t->picker().mark_as_downloading(block, peer_info_struct(), state)) return; - if (t->alerts().should_post(alert::info)) + if (t->alerts().should_post(alert::debug)) { t->alerts().post_alert(block_downloading_alert(t->get_handle(), speedmsg, block.block_index, block.piece_index, "block downloading")); diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index 35abc2c49..33fbe9b40 100755 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -825,7 +825,7 @@ namespace libtorrent if (passed_hash_check) { - if (m_ses.m_alerts.should_post(alert::info)) + if (m_ses.m_alerts.should_post(alert::debug)) { m_ses.m_alerts.post_alert(piece_finished_alert(get_handle() , index, "piece finished"));