1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00
miniflux-v2/internal/reader
jvoisin 86c58e11f6 perf(reader): use a non-cryptographic hash when possible
There is no need to use SHA256 everywhere, especially on small inputs where we
don't care about its cryptographic properties. We're using FNV as it's the
faster available hash in go's standard library, and we're picking its "a"
version as it's slightly better avalanche characteristics, which are
relevant for small inputs.

This commit has the side-effect of invalidating all favicons saved in the
database, which is desirable to benefit from the resize process implemented in
777d0dd2, as it didn't apply retro-actively.

We're also making use of hex.EncodeToString instead of fmt.Sprintf, as it's
marginally faster.

Note that we can't change the usage of sha256 for feed.Hash as it's used to
deduplicate entries in the database.
2025-06-18 20:28:23 -07:00
..
atom perf(reader): use a non-cryptographic hash when possible 2025-06-18 20:28:23 -07:00
date refactor(date): use an else-if instead of two if statements 2025-02-06 19:44:12 -08:00
dublincore Refactor RDF parser to use an adapter 2024-03-12 20:54:05 -07:00
encoding fix(scraper): avoid encoding issue if charset meta tag is after 1024 bytes 2025-02-15 17:05:14 -08:00
fetcher perf(fetcher): pre-allocate the cipherSuites 2025-06-17 16:53:00 -07:00
googleplay Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
handler feat(config): add SCHEDULER_ROUND_ROBIN_MAX_INTERVAL option 2025-04-11 15:40:32 -07:00
icon feat: implement proxy URL per feed 2025-04-06 21:05:19 -07:00
itunes Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
json perf(reader): use a non-cryptographic hash when possible 2025-06-18 20:28:23 -07:00
media perf(media): minor regex simplification 2025-06-17 16:49:07 -07:00
opml fix(api): hide_globally categories field should be a boolean 2025-04-21 19:43:25 -07:00
parser refactor(tests): use b.Loop() instead of for range b.N 2025-06-18 20:12:55 -07:00
processor refactor(processor): minor simplification of a loop 2025-06-17 17:30:13 -07:00
rdf perf(reader): use a non-cryptographic hash when possible 2025-06-18 20:28:23 -07:00
readability perf(readability): minor regex improvement 2025-06-12 19:13:58 -07:00
readingtime refactor(tests): use b.Loop() instead of for range b.N 2025-06-18 20:12:55 -07:00
rewrite perf(rewrite): make getPredefinedRewriteRules O(1) 2025-06-17 17:27:36 -07:00
rss perf(reader): use a non-cryptographic hash when possible 2025-06-18 20:28:23 -07:00
sanitizer refactor(tests): use b.Loop() instead of for range b.N 2025-06-18 20:12:55 -07:00
scraper refactor(internal): add an urllib.DomainWithoutWWW function 2025-06-17 17:27:36 -07:00
subscription feat(rssbridge): support auth token for RSS-Bridge 2025-05-19 20:47:12 -07:00
urlcleaner perf(reader): optimize RemoveTrackingParameters 2025-06-10 19:29:25 -07:00
xml fix(reader): fix a crash introduced by d59990f1 2025-06-11 19:04:46 -07:00