Artwork deduplication should be done with hashes, not by full data comparison. This should be a lot faster loading artwork from files now, especially if the playlist already contains a lot of unique artwork. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
27 lines
679 B
Objective-C
27 lines
679 B
Objective-C
//
|
|
// RedundantPlaylistDataStore.h
|
|
// Cog
|
|
//
|
|
// Created by Christopher Snowhill on 2/16/22.
|
|
//
|
|
|
|
// This is designed primarily for the PlaylistEntry info loader, to prevent
|
|
// memory overrun due to redundant blobs of data being duplicated repeatedly
|
|
// until the list is fully loaded. This instance will be discarded after the
|
|
// info is loaded, freeing up hopefully way less memory afterward than now.
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface RedundantPlaylistDataStore : NSObject {
|
|
NSMutableArray *stringStore;
|
|
NSMutableDictionary *artStore;
|
|
}
|
|
|
|
- (id)init;
|
|
- (NSDictionary *)coalesceEntryInfo:(NSDictionary *)pe;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|