forgejo/routers/api/v1/repo
Lunny Xiao c9854bee98 Do some performance optimize for issues list and view issue/pull (gitea#29515)
This PR do some performance optimzations.

- [x] Add `index` for the column `comment_id` of `Attachment` table to
accelerate query from the database.
- [x] Remove unnecessary database queries when viewing issues. Before
some conditions which id = 0 will be sent to the database
- [x] Remove duplicated load posters
- [x] Batch loading attachements, isread of comments on viewing issue

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
Conflicts:
models/issues/comment_code.go: function was renamed in Forgejo
models/migrations/migrations.go: migration already ported
2024-04-08 14:47:31 +02:00
..
action.go
avatar.go
blob.go
branch.go
collaborators.go
commits.go
file.go
flags.go
fork.go
git_hook.go
git_ref.go
hook.go
hook_test.go
issue.go
issue_attachment.go
issue_comment.go Do some performance optimize for issues list and view issue/pull (gitea#29515) 2024-04-08 14:47:31 +02:00
issue_comment_attachment.go
issue_dependency.go
issue_label.go
issue_pin.go
issue_reaction.go
issue_stopwatch.go
issue_subscription.go
issue_tracked_time.go
key.go
label.go
language.go
main_test.go
migrate.go
milestone.go
mirror.go
notes.go
patch.go
pull.go
pull_review.go Prevent re-review and dismiss review actions on closed and merged PRs (#30065) 2024-03-30 07:17:32 +01:00
release.go
release_attachment.go
release_tags.go
repo.go
repo_test.go
runners.go
star.go
status.go
subscriber.go
tag.go
teams.go
topic.go
transfer.go
tree.go
wiki.go