1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

perf(storage): pre-allocate a slice in RefreshFeedEntries

This commit is contained in:
jvoisin 2025-06-20 14:24:40 +02:00 committed by Frédéric Guillot
parent 6d58052504
commit 109e668ac7

View file

@ -269,7 +269,7 @@ func (s *Storage) cleanupEntries(feedID int64, entryHashes []string) error {
// RefreshFeedEntries updates feed entries while refreshing a feed.
func (s *Storage) RefreshFeedEntries(userID, feedID int64, entries model.Entries, updateExistingEntries bool) (newEntries model.Entries, err error) {
var entryHashes []string
entryHashes := make([]string, 0, len(entries))
for _, entry := range entries {
entry.UserID = userID