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/rss
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
..
adapter.go perf(reader): use a non-cryptographic hash when possible 2025-06-18 20:28:23 -07:00
atom.go Remove some duplicated code in RSS parser 2024-03-15 18:40:06 -07:00
feedburner.go Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
parser.go Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
parser_test.go feat: populate feed description automatically 2025-05-24 21:15:52 -07:00
podcast.go Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
rss.go fix(rss): handle item title with CDATA content correctly 2025-02-15 14:51:27 -08:00