perf: virtualize LUT directory rows as well as thumbnails for large libraries

这个提交包含在:
mac 于 2026-11-01 11:09:41 +08:00 提交
1 父节点 87baa785fd
当前提交 838037a7e0
4 个文件已更改
+45 -21

没有与搜索条件相匹配的文件

+2 -1
查看文件
@@ -316,7 +316,8 @@ static BOOL DYLUTEnsureDirectory(NSURL *directory,NSURL *root,NSError **error) {
if(scanError){if(error)*error=scanError;return NO;}
[entries sortUsingComparator:^NSComparisonResult(NSDictionary *a,NSDictionary *b){return [a[@"relativePath"]localizedStandardCompare:b[@"relativePath"]];}];
if(DYLUTCancelled(progress,error))return NO;
@synchronized(self){[_entries release];_entries=[entries copy];[_folders release];_folders=[[folders.allObjects sortedArrayUsingSelector:@selector(localizedStandardCompare:)]copy];}return YES;
NSArray *sortedFolders=[folders.allObjects sortedArrayUsingSelector:@selector(localizedStandardCompare:)];
@synchronized(self){[_entries release];_entries=[entries copy];[_folders release];_folders=[sortedFolders copy];}return YES;
}}
- (NSArray *)importURLs:(NSArray<NSURL *> *)urls error:(NSError **)error {return [self importURLs:urls progress:nil error:error];}
- (NSArray *)importURLs:(NSArray<NSURL *> *)urls progress:(NSProgress *)progress error:(NSError **)error {@synchronized(_fileLock){