added another disk cache flush algorithm to minimize readback when hashing pieces

This commit is contained in:
Arvid Norberg
2011-03-20 05:47:27 +00:00
parent 11e5e2539a
commit e4df633157
8 changed files with 101 additions and 32 deletions

View File

@@ -1845,7 +1845,8 @@ int main(int argc, char* argv[])
out += esc("0");
#endif
char const* piece_state[4] = {"", " slow", " medium", " fast"};
snprintf(str, sizeof(str), "]%s", piece_state[i->piece_state]);
snprintf(str, sizeof(str), "] %2d%s ", cp ? cp->next_to_hash : -1
, piece_state[i->piece_state]);
out += str;
if (cp)
{