1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00
miniflux-v2/internal
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
..
api fix(consistency): align feed modification behavior between API and UI 2024-12-08 10:49:14 -08:00
cli refactor(locale): delay parsing of translations until they're used 2024-12-09 17:05:14 -08:00
config feat: optionally fetch watch time from YouTube API instead of website 2024-12-07 16:00:35 -08:00
crypto Make use of HashFromBytes everywhere 2024-03-11 15:22:22 -07:00
database feat(integration): add cubox integration 2024-10-18 18:06:09 -07:00
fever fix(fever): correct sorting direction when using max_id argument 2024-08-17 18:08:01 -07:00
googlereader feat: add API routes /v1/enclosures/{enclosureID} 2024-08-18 11:53:19 -07:00
http Make cookie duration dependent on configuration 2024-05-01 19:34:13 -07:00
integration fix(linting): remove unnecessary blank line in PushEntries function 2024-12-07 16:19:53 -08:00
locale refactor(locale): delay parsing of translations until they're used 2024-12-09 17:05:14 -08:00
mediaproxy fix: use root URL to generate absolute proxy URL 2024-08-19 20:44:46 -07:00
metric Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
model fix: show only one player when there are several audio/video enclosures 2024-11-03 21:28:26 -08:00
oauth2 Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
reader refactor(handler): delay store.UserByID as much as possible 2024-12-09 19:32:59 -08:00
storage fix: replace timezone function call with view 2024-12-03 01:44:48 -08:00
systemd Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
template feat: only show the commit URL if it's not empty on /about 2024-11-12 20:09:48 -08:00
timezone timezone: make sure the tests pass when the timezone database is not installed on the host 2024-03-24 13:25:02 -07:00
ui refactor(locale): delay parsing of translations until they're used 2024-12-09 17:05:14 -08:00
urllib Use strings.EqualFold instead of strings.ToLower(…) == 2024-02-28 19:47:30 -08:00
validator refactor(locale): delay parsing of translations until they're used 2024-12-09 17:05:14 -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