diff options
| author | Fuwn <[email protected]> | 2026-02-18 12:37:24 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-18 12:38:39 -0800 |
| commit | cae0093bfb3f65ff4ed9a7879b0dc2f406794c2c (patch) | |
| tree | fe8cc5982020e2b9f9b6012a6244504c3f9ef7cf /Sora/Data/ColumnsDataCache.swift | |
| parent | perf: reduce suggestion and image handling hot-path overhead (diff) | |
| download | sora-testing-cae0093bfb3f65ff4ed9a7879b0dc2f406794c2c.tar.xz sora-testing-cae0093bfb3f65ff4ed9a7879b0dc2f406794c2c.zip | |
perf: memoize post grid derived collections and remove columns cache
Diffstat (limited to 'Sora/Data/ColumnsDataCache.swift')
| -rw-r--r-- | Sora/Data/ColumnsDataCache.swift | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/Sora/Data/ColumnsDataCache.swift b/Sora/Data/ColumnsDataCache.swift deleted file mode 100644 index bec37fb..0000000 --- a/Sora/Data/ColumnsDataCache.swift +++ /dev/null @@ -1,17 +0,0 @@ -struct ColumnsDataCache: Equatable { - let data: [[BooruPost]] - let columnCount: Int - let posts: [BooruPost] - - static func == (lhs: Self, rhs: Self) -> Bool { - guard lhs.columnCount == rhs.columnCount else { return false } - guard lhs.posts.count == rhs.posts.count else { return false } - guard !lhs.posts.isEmpty, !rhs.posts.isEmpty else { - return lhs.posts.isEmpty == rhs.posts.isEmpty - } - guard lhs.posts.first?.id == rhs.posts.first?.id else { return false } - guard lhs.posts.last?.id == rhs.posts.last?.id else { return false } - - return true - } -} |