forgejo/routers/web/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
..
actions Fix bugs in rerunning jobs (#29955) 2024-03-26 19:04:26 +01:00
badges
flags
setting [REFACTOR] webhook shared code to prevent import cycles 2024-04-04 08:24:33 +02:00
activity.go
attachment.go
blame.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
branch.go
cherry_pick.go
code_frequency.go
commit.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
compare.go Fix view file button in diff compare 2024-04-05 05:27:20 +02:00
contributors.go
download.go
editor.go [BUG] Use correct template for commitmail error 2024-04-02 15:08:53 +02:00
editor_test.go
find.go Escape paths for find file correctly (#30026) 2024-03-26 19:04:27 +01:00
githttp.go
githttp_test.go
helper.go
helper_test.go
issue.go Do some performance optimize for issues list and view issue/pull (gitea#29515) 2024-04-08 14:47:31 +02:00
issue_content_history.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
issue_dependency.go
issue_label.go [GITEA] Apply changes to archived labels 2024-04-01 17:46:02 +05:00
issue_label_test.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go
milestone.go
packages.go
patch.go
projects.go Add default board to new projects, remove uncategorized pseudo-board (#29874) 2024-03-30 07:17:31 +01:00
projects_test.go
pull.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
pull_review.go Do some performance optimize for issues list and view issue/pull (gitea#29515) 2024-04-08 14:47:31 +02:00
pull_review_test.go [TESTS] pull review deleted from gitea#29888 2024-03-31 13:53:47 +02:00
recent_commits.go
release.go Highlight signed tags like signed commits 2024-03-30 20:14:42 +01:00
release_test.go
render.go Refactor render (#30136) 2024-03-30 07:17:31 +01:00
repo.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
search.go Support repo code search without setting up an indexer (#29998) 2024-03-28 05:16:51 +00:00
topic.go
treelist.go
view.go Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
view_test.go
wiki.go
wiki_test.go