mirror of
https://github.com/transmission/transmission.git
synced 2026-02-15 07:26:49 +00:00
perf: permanently cache Torrent.hashString
This commit is contained in:
@@ -46,6 +46,7 @@ static dispatch_queue_t timeMachineExcludeQueue;
|
|||||||
@property(nonatomic) TorrentDeterminationType fDownloadFolderDetermination;
|
@property(nonatomic) TorrentDeterminationType fDownloadFolderDetermination;
|
||||||
|
|
||||||
@property(nonatomic) BOOL fResumeOnWake;
|
@property(nonatomic) BOOL fResumeOnWake;
|
||||||
|
@property(nonatomic, strong, readonly) NSString* hashString;
|
||||||
|
|
||||||
- (void)renameFinished:(BOOL)success
|
- (void)renameFinished:(BOOL)success
|
||||||
nodes:(NSArray<FileListNode*>*)nodes
|
nodes:(NSArray<FileListNode*>*)nodes
|
||||||
@@ -739,7 +740,7 @@ bool trashDataFile(char const* filename, void* /*user_data*/, tr_error* error)
|
|||||||
|
|
||||||
- (NSString*)hashString
|
- (NSString*)hashString
|
||||||
{
|
{
|
||||||
return @(tr_torrentView(self.fHandle).hash_string);
|
return _hashString;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)privateTorrent
|
- (BOOL)privateTorrent
|
||||||
@@ -1849,6 +1850,7 @@ bool trashDataFile(char const* filename, void* /*user_data*/, tr_error* error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_fResumeOnWake = NO;
|
_fResumeOnWake = NO;
|
||||||
|
_hashString = @(tr_torrentView(self.fHandle).hash_string);
|
||||||
|
|
||||||
//don't do after this point - it messes with auto-group functionality
|
//don't do after this point - it messes with auto-group functionality
|
||||||
if (!self.magnet)
|
if (!self.magnet)
|
||||||
|
|||||||
Reference in New Issue
Block a user