1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00
miniflux-v2/internal/reader/sanitizer
Julien Voisin dea46ac0ea
refactor: optimize sanitizeAttributes
- Use string concatenation instead of `Sprintf`, as this is much faster, and the
  call to `Sprintf` is responsible for 30% of the CPU time of the function
- Anchor the youtube regex, to allow it to bail early, as this also account for
  another 30% of the CPU time. It might be worth chaining calls to `TrimPrefix`
  and check if the string has been trimmed instead of using a regex, to speed
  things up even more, but this needs to be benchmarked properly.
2024-12-08 14:42:18 -08:00
..
testdata Speed the sanitizer up a bit, again 2024-03-05 19:31:50 -08:00
sanitizer.go refactor: optimize sanitizeAttributes 2024-12-08 14:42:18 -08:00
sanitizer_test.go feat: remove well-known URL parameter trackers 2024-07-19 21:35:47 -07:00
srcset.go refactor(sanitizer): micro-optimizations of internal/reader/sanitizer/srcset.go 2024-12-07 16:27:56 -08:00
srcset_test.go Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
strip_tags.go refactor(sanitizer): optimize internal/reader/sanitizer/strip_tags.go 2024-12-07 16:31:48 -08:00
strip_tags_test.go Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
truncate.go Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
truncate_test.go Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00