1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00
miniflux-v2/internal/reader
Julien Voisin 637fb85de0
refactor(handler): delay store.UserByID as much as possible
In internal/reader/handler/handler.go:RefreshFeed, there is a call to
store.UserByID pretty early, which is only used for
originalFeed.WithTranslatedErrorMessage(localizedError.Translate(user.Language)
Its only other usage is in processor.ProcessFeedEntries(store, originalFeed,
user, forceRefresh), which is pretty late in RefreshFeed, and only called if
there are new items in the feed. It makes sense to only fetch the user's
language if the error localization function is used.

Calls to `store.UserByID` take around 10% of the CPU time of RefreshFeed in my
profiling.

This commit also makes `processor.ProcessFeedEntries` take a `userID` instead
of a `user`, to make the code a bit more concise.

This should close #2984
2024-12-09 19:32:59 -08:00
..
atom Ensure enclosure URLs are always absolute 2024-03-19 21:57:46 -07:00
date Small refactoring of internal/reader/date/parser.go 2024-02-26 18:08:04 -08:00
dublincore Refactor RDF parser to use an adapter 2024-03-12 20:54:05 -07:00
encoding Inline a one-liner function 2024-03-20 17:21:30 -07:00
fetcher fix: avoid panic in IsRateLimited() function 2024-10-06 21:34:23 -07:00
googleplay Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
handler refactor(handler): delay store.UserByID as much as possible 2024-12-09 19:32:59 -08:00
icon fix: load icon from site URL instead of feed URL 2024-12-07 16:06:26 -08:00
itunes Refactor RSS Parser to use an adapter 2024-03-13 21:25:09 -07:00
json Ensure enclosure URLs are always absolute 2024-03-19 21:57:46 -07:00
media Minor simplification of internal/reader/media/media.go 2024-03-18 16:09:32 -07:00
opml Add description field to feed settings 2024-05-06 15:40:36 -07:00
parser Refactor Atom parser to use an adapter 2024-03-15 17:27:16 -07:00
processor refactor(handler): delay store.UserByID as much as possible 2024-12-09 19:32:59 -08:00
rdf Remove trailing space in SiteURL and FeedURL 2024-03-18 17:51:06 -07:00
readability refactor(readability): simplify the regexes in internal/reader/readability/readability.go 2024-12-07 16:56:19 -08:00
readingtime reader/readingtime: fix incorrect package name 2024-05-21 18:12:24 -07:00
rewrite feat(rewrite)!: remove parse_markdown rewrite rule 2024-12-08 14:34:47 -08:00
rss feat(rss): calculate hash based on item title/content for feeds without GUID and link 2024-10-18 18:37:38 -07:00
sanitizer refactor(sanitizer): improve rewriteIframeURL() 2024-12-09 17:14:54 -08:00
scraper feat: add predefined scraper rules for arstechnica.com 2024-11-14 17:47:31 -08:00
subscription refactor(subscription): use strings.HasSuffix instead of a regex in FindSubscriptionsFromYouTubePlaylistPage 2024-12-09 17:19:28 -08:00
urlcleaner fix: do not alter the original URL if there is no tracker parameter 2024-07-25 22:10:28 -07:00
xml Enable go-critic linter and fix various issues detected 2024-03-17 13:52:34 -07:00