reduced usage of isLocal in favour of checking hoarder.downloadedEmojis

wrote tests to check that, Set checking is 1.5 to 2x faster
This commit is contained in:
neon443
2025-11-05 19:50:10 +00:00
parent c3cfecb87e
commit 08ad69b19a
4 changed files with 16 additions and 4 deletions

View File

@@ -140,4 +140,16 @@ struct PerformanceTests {
let _ = hoarder.trie.search(prefix: term)
}
}
@Test func testIsLocal() async throws {
for emoji in hoarder.emojis {
let x = emoji.isLocal
}
}
@Test func testDownloadedEmojis() async throws {
for emoji in hoarder.emojis {
let x = hoarder.downloadedEmojis.contains(emoji.name)
}
}
}