diff options
author | 2024-03-04 00:51:55 +0100 | |
---|---|---|
committer | 2024-03-03 20:34:37 -0800 | |
commit | 3339d9d3d7ca08852bb430fee3aa8ac82a9cfc9f (patch) | |
tree | 6ff14bc54b2096abd99e5d95cac7fb336f935b4a /internal/reader/opml/handler.go | |
parent | 8d80e9103f836284b73bc8d176c5ca63c31b0dfc (diff) | |
download | v2-3339d9d3d7ca08852bb430fee3aa8ac82a9cfc9f.tar.gz v2-3339d9d3d7ca08852bb430fee3aa8ac82a9cfc9f.tar.zst v2-3339d9d3d7ca08852bb430fee3aa8ac82a9cfc9f.zip |
Preallocate memory when exporting to OPML
This should marginally increase performance when export a large amount of feeds
to OPML.
Diffstat (limited to 'internal/reader/opml/handler.go')
-rw-r--r-- | internal/reader/opml/handler.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/reader/opml/handler.go b/internal/reader/opml/handler.go index c3e972b9..9257d354 100644 --- a/internal/reader/opml/handler.go +++ b/internal/reader/opml/handler.go @@ -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, |