Ignore:
Timestamp:
Feb 2, 2011, 9:17:16 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) #2955 "verify pieces only when necessary, or when the user requests it." -- improvements to .resume file

As pointed out by longinus00 and ijuxda, storing per-piece timestamps in the .resume file can involve a lot of overhead. This commit reduces the overhead by adding a couple of optimizations: (1) in cases where *all* or *none* of the files' pieces were checked after the file's mtime, we can safely fold all the pieces' mtimes into a single per-file mtime. (2) since unix time takes up a lot of space when rendered as a benc integer, find a common per-file "baseline" number, then store the pieces' timestamps as offsets from that number. Also add documentation explaining this new format, and also better explaining the pre-2.20 progress format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.h

    r11807 r11814  
    430430tr_bool tr_torrentCheckPiece( tr_torrent * tor, tr_piece_index_t pieceIndex );
    431431
     432time_t tr_torrentGetFileMTime( const tr_torrent * tor, tr_file_index_t i );
     433
    432434uint64_t tr_torrentGetCurrentSizeOnDisk( const tr_torrent * tor );
    433435
Note: See TracChangeset for help on using the changeset viewer.