forgejo/models/repo
Gusted d5c8091e08 perf: optimize converting releases to feed items (#7221)
- `releasesToFeedItems` is called to convert release structs to feed items, which is then used to render RSS or Atom feeds.
- Optimize the loading of attributes for the releases, introduce `ReleaseList` type which uses caching to load repository and publishers. It also no longer loads release attachments and downloads counts as that is not used in feed items.
- Optimize the composing of meta by introducing caching, this operation is especially slow when the owner is an organization.
- Add unit test (ensures new `LoadAttributes` works correctly).
- Add integration test (ensures that feed output is still as expected).

Loading https://codeberg.org/forgejo/forgejo/releases.rss reduced from ~15s to ~1s. (It is currently is deployed on codeberg.org)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7221
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-17 09:00:34 +00:00
..
TestSearchRepositoryIDsByCondition fix: anomynous users code search for private/limited user's repository 2024-11-15 10:59:36 +01:00
archive_download_count.go chore: fix typos, decap a few i18n strings (#6666) 2025-01-24 05:41:59 +00:00
archive_download_count_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
archiver.go Count downloads for tag archives 2024-04-08 12:51:27 +02:00
attachment.go chore: Remove DeleteAttachmentsByIssue 2025-01-30 12:19:59 +01:00
attachment_test.go chore: Remove DeleteAttachmentsByIssue 2025-01-30 12:19:59 +01:00
avatar.go
collaboration.go
collaboration_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
following_repo.go ui for adding following repos 2024-05-24 13:28:15 +02:00
following_repo_test.go ui for adding following repos 2024-05-24 13:28:15 +02:00
fork.go fix: don't show private forks in forks list 2024-11-15 10:59:36 +01:00
fork_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
git.go feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
issue.go Clean up log messages (#30313) 2024-04-15 20:01:35 +02:00
language_stats.go chore: remove usages of sort.Sort (#6689) 2025-01-26 13:30:00 +00:00
language_stats_test.go chore: remove usages of sort.Sort (#6689) 2025-01-26 13:30:00 +00:00
main_test.go tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
mirror.go
pushmirror.go [FEAT] Allow pushmirror to use publickey authentication 2024-08-22 17:05:07 +02:00
pushmirror_test.go [FEAT] Allow pushmirror to use publickey authentication 2024-08-22 17:05:07 +02:00
redirect.go
redirect_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
release.go linting: fix typos, add toml validation (#7007) 2025-02-21 08:23:03 +00:00
release_list.go perf: optimize converting releases to feed items (#7221) 2025-03-17 09:00:34 +00:00
release_list_test.go perf: optimize converting releases to feed items (#7221) 2025-03-17 09:00:34 +00:00
release_test.go Update 2024-12-30 17:47:34 +01:00
repo.go perf: avoid sorting team names for ComposeMetas (#7223) 2025-03-17 09:00:12 +00:00
repo_flags.go
repo_flags_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
repo_indexer.go
repo_list.go chore: Remove FindReposMapByIDs 2025-01-30 12:19:59 +01:00
repo_list_test.go fix: anomynous users code search for private/limited user's repository 2024-11-15 10:59:36 +01:00
repo_repository.go ui for adding following repos 2024-05-24 13:28:15 +02:00
repo_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
repo_unit.go feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
repo_unit_test.go feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
search.go fix: Add recentupdated as recognized sort option 2024-10-19 23:53:29 +02:00
star.go
star_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
topic.go chore: Remove GetTopicByName 2025-01-30 12:19:59 +01:00
topic_test.go chore: Remove GetTopicByName 2025-01-30 12:19:59 +01:00
update.go
upload.go
user_repo.go fix: make author search case insenstive (#6782) 2025-02-04 16:33:47 +00:00
user_repo_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
watch.go
watch_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
wiki.go
wiki_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00