- Mar 08, 2024
-
-
dependabot[bot] authored
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.1 to 3.0.3. - [Release notes](https://github.com/go-jose/go-jose/releases) - [Changelog](https://github.com/go-jose/go-jose/blob/v3.0.3/CHANGELOG.md) - [Commits](https://github.com/go-jose/go-jose/compare/v3.0.1...v3.0.3 ) --- updated-dependencies: - dependency-name: github.com/go-jose/go-jose/v3 dependency-type: indirect ... Signed-off-by:
dependabot[bot] <support@github.com>
-
- Mar 07, 2024
-
-
jvoisin authored
This will allow to make use of func (*Reader) Seek, instead of re-recreating a new reader. It's a large commit for a small change, but anything to simply the reader/buffer/ReadAll/… mess is a step in the right direction I think, and it should enable more follow-up simplifications.
-
- Mar 06, 2024
-
-
jvoisin authored
- allow youtube urls to start with `www` - use `strings.Builder` instead of a `bytes.Buffer` - use a `strings.NewReader` instead of a `bytes.NewBufferString` - sprinkles a couple of `continue` to make the code-flow more obvious - inline calls to `inList`, and put their parameters in the right order - simplify isPixelTracker - simplify `isValidIframeSource`, by extracting the hostname and comparing it directly, instead of using the full url and checking if it starts with multiple variations of the same one (`//`, `http:`, `https://` multiplied by ``/`www.`) - add a benchmark
-
- Mar 05, 2024
-
-
dependabot[bot] authored
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.17.0 to 0.18.0. - [Commits](https://github.com/golang/oauth2/compare/v0.17.0...v0.18.0 ) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by:
dependabot[bot] <support@github.com>
-
jvoisin authored
-
dependabot[bot] authored
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.22.0. - [Commits](https://github.com/golang/net/compare/v0.21.0...v0.22.0 ) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by:
dependabot[bot] <support@github.com>
-
- Mar 04, 2024
-
-
jvoisin authored
This should marginally increase performance when export a large amount of feeds to OPML.
-
jvoisin authored
There is no need to do extra work like creating a session and its associated view until the user has been properly identified and as many possibly-failing sql request have been successfully run.
-
jvoisin authored
This is probably completely overkill, but since anti-csrf tokens are secrets, they should be compared against untrusted inputs in constant time.
-
jvoisin authored
- Reduce the amount of nested loops: it's preferable to search the whole page once and filter on it (even with filters that should always be false), than searching it again for every element we're looking for. - Factorize the proxying conditions into a `shouldProxy` function to reduce the copy-pasta.
-
Thiago Perrotta authored
-
- Mar 02, 2024
-
-
Frédéric Guillot authored
-
- Mar 01, 2024
-
-
Frédéric Guillot authored
-
jvoisin authored
`.Not` returns a brand new Selection, copied element by element.
-
jvoisin authored
- 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 $ ```
-
jvoisin authored
If the user doesn't display reading times, there is no need to compute them. This should speed things up a bit, since `whatlanggo.Detect` is abysmally slow.
-
Frédéric Guillot authored
This reverts commit 4db138d4. ``` panic: runtime error: index out of range [-1] goroutine 49 [running]: miniflux.app/v2/internal/reader/readability.getArticle.func1(0x8?, 0xc000b56570) /home/fred/repos/miniflux/v2/internal/reader/readability/readability.go:120 +0x2ac github.com/PuerkitoBio/goquery.(*Selection).Each(0xc000b56510, 0xc000892fa8) /home/fred/go/pkg/mod/github.com/!puerkito!bio/goquery@v1.9.0/iteration.go:10 +0x62 miniflux.app/v2/internal/reader/readability.getArticle(0xc00044f1f0, 0xc000a04a50) /home/fred/repos/miniflux/v2/internal/reader/readability/readability.go:101 +0x15d miniflux.app/v2/internal/reader/readability.ExtractContent({0x1005d00?, 0xc0001522d0?}) /home/fred/repos/miniflux/v2/internal/reader/readability/readability.go:91 +0x211 miniflux.app/v2/internal/reader/scraper.ScrapeWebsite(0xc000893688?, {0xc0007ce720, 0x54}, {0x0, 0x0}) /home/fred/repos/miniflux/v2/internal/reader/scraper/scraper.go:63 +0x859 miniflux.app/v2/internal/reader/processor.ProcessFeedEntries(0xc000133188, 0xc000502c40, 0xc0003e6360, 0x0) /home/fred/repos/miniflux/v2/internal/reader/processor/processor.go:77 +0x8ea miniflux.app/v2/internal/reader/handler.RefreshFeed(0xc000133188, 0x10cf, 0x52d5c, 0x0) /home/fred/repos/miniflux/v2/internal/reader/handler/handler.go:301 +0x1485 miniflux.app/v2/internal/cli.refreshFeeds.func1(0x0) /home/fred/repos/miniflux/v2/internal/cli/refresh_feeds.go:59 +0x2d7 created by miniflux.app/v2/internal/cli.refreshFeeds in goroutine 1 /home/fred/repos/miniflux/v2/internal/cli/refresh_feeds.go:50 +0x5d5 ```
-
dependabot[bot] authored
Bumps [github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/PuerkitoBio/goquery/releases) - [Commits](https://github.com/PuerkitoBio/goquery/compare/v1.9.0...v1.9.1 ) --- updated-dependencies: - dependency-name: github.com/PuerkitoBio/goquery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by:
dependabot[bot] <support@github.com>
-
jvoisin authored
No need to generate random numbers 10 times, generate a single big-enough one. A single int64 should be more than enough
-
- Feb 29, 2024
-
-
Frédéric Guillot authored
-
Frédéric Guillot authored
-
jvoisin authored
- Don't use a capturing group in `divToPElementsRegexp` - Remove a duplicate condition - Replace a regex with a fixed-comparison and a `Contains`
-
jvoisin authored
Instead of having to allocate a ~100 keys map containing possibly dynamic values (at least to the go compiler), allocate it once in a global variable. This significantly speeds things up, by reducing the garbage collector/allocator involvements. Local synthetic benchmarks have shown a improvements from 38% of wall time to only 12%.
-
jvoisin authored
- `make([]a, b)` create a slice of `b` elements `a` - `make([]a, b, c)` create a slice of `0` elements `a`, but reserve space for `c` of them When using `append` on the former, it will result on a slice with `b` leading elements, which is unlikely to be what we want. This commit replaces the two instances where this happens with the latter construct.
-
jvoisin authored
Go 1.22 introduced a new [for-range](https://go.dev/ref/spec#For_range) construct that looks a tad better than the usual `for i := 0; i < N; i++` construct. I also tool the liberty of replacing some `for i := 0; i < len(myitemsarray); i++ { … myitemsarray[i] …}` with `for item := range myitemsarray` when `myitemsarray` contains only pointers.
-
jvoisin authored
No need to check if the length of `line` is positive since we're checking afterwards that it contains the `=` sign.
-
jvoisin authored
So that resources can be freed as soon as they're not used anymore, instead of waiting for the two nested loops to finish.
-
jvoisin authored
-
jvoisin authored
-
jvoisin authored
-
jvoisin authored
-
jvoisin authored
-
jvoisin authored
Since workers don't communicate anything back to the pool with the channel, there is no need to have it bidirectional.
-
jvoisin authored
Less lines or code and marginally greater readability, yay! Oh and also preallocate a map in LoadCatalogMessages just because we can.
-
jvoisin authored
No need to use a loop with divisions and multiplications when we have logarithms.
-
jvoisin authored
-
jvoisin authored
-
jvoisin authored
-
jvoisin authored
No need to use variadic functions with string format interpolation to generate static strings.
-
- Feb 28, 2024
-
-
dependabot[bot] authored
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.18.0 to 1.19.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.19.0/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0 ) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by:
dependabot[bot] <support@github.com>
-