miniflux-v2/internal
jvoisin ab85d4d678 Improve EstimateReadingTime's speed by a factor 7
- Refactorise the tests and add some
- Use 250 signs instead of the whole text
- Only check for Korean, Chinese and Japanese script
- Add a benchmark
- Use a more idiomatic control flow

```console
$ # main branch
$ go test -bench=.
goos: linux
goarch: amd64
pkg: miniflux.app/v2/internal/reader/readingtime
BenchmarkEstimateReadingTime-12              267           4821268 ns/op
PASS
ok      miniflux.app/v2/internal/reader/readingtime     1.754s
$ # speed_up_reading_time branch
$ go test -bench=.
goos: linux
goarch: amd64
pkg: miniflux.app/v2/internal/reader/readingtime
cpu: 12th Gen Intel(R) Core(TM) i7-1265U
BenchmarkEstimateReadingTime-12             1941            653312 ns/op
PASS
ok      miniflux.app/v2/internal/reader/readingtime     1.342s
$
```
2024-02-29 19:24:15 -08:00
..
api Don't compute reading-time when unused 2024-02-29 19:14:17 -08:00
cli Use modern for loops 2024-02-28 19:55:28 -08:00
config Remove a superfluous condition 2024-02-28 19:47:30 -08:00
crypto Remove github.com/google/uuid 2024-02-26 18:31:12 -08:00
database Add feed option to disable HTTP/2 to avoid fingerprinting 2024-02-24 22:30:26 -08:00
fever Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
googlereader Don't mix up capacity and length 2024-02-28 19:57:30 -08:00
http Fix inaccessible metrics endpoint when listening on Unix socket 2023-12-06 19:52:33 -08:00
integration Use %q instead of "%s" 2024-02-28 19:47:30 -08:00
locale Add missing plurals for some languages 2024-02-28 20:38:10 -08:00
metric Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
model Use %q instead of "%s" 2024-02-28 19:47:30 -08:00
oauth2 Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
proxy Proxify video poster attribute 2024-02-23 18:44:20 -08:00
reader Improve EstimateReadingTime's speed by a factor 7 2024-02-29 19:24:15 -08:00
storage Don't mix up capacity and length 2024-02-28 19:57:30 -08:00
systemd Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
template Simplify formatFileSize 2024-02-28 19:32:38 -08:00
tests Simplify username generation for the tests 2024-02-29 18:36:34 -08:00
timezone Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
ui Use %q instead of "%s" 2024-02-28 19:47:30 -08:00
urllib Use strings.EqualFold instead of strings.ToLower(…) == 2024-02-28 19:47:30 -08:00
validator Remove Golint 2024-02-24 21:17:56 -08:00
version Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
worker Use modern for loops 2024-02-28 19:55:28 -08:00