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

Preallocate memory when exporting to OPML

This should marginally increase performance when export a large amount of feeds
to OPML.
This commit is contained in:
jvoisin 2024-03-04 00:51:55 +01:00 committed by Frédéric Guillot
parent 8d80e9103f
commit 3339d9d3d7
2 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ func (h *Handler) Export(userID int64) (string, error) {
return "", err
}
var subscriptions SubcriptionList
subscriptions := make(SubcriptionList, 0, len(feeds))
for _, feed := range feeds {
subscriptions = append(subscriptions, &Subcription{
Title: feed.Title,