1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

perf: cache the format of feeds

Detecting the format of a feed accounts for up to 30% of the time spent in
`parser.ParseFeed`. Cache the value once detected, as it'll never change.
This commit is contained in:
jvoisin 2025-02-04 16:12:31 +01:00
parent e342a4f143
commit c4a2afb7b7
12 changed files with 58 additions and 11 deletions

View file

@ -29,6 +29,7 @@ func (j *JSONAdapter) BuildFeed(baseURL string) *model.Feed {
Title: strings.TrimSpace(j.jsonFeed.Title),
FeedURL: strings.TrimSpace(j.jsonFeed.FeedURL),
SiteURL: strings.TrimSpace(j.jsonFeed.HomePageURL),
Format: "json",
}
if feed.FeedURL == "" {