forgejo/routers/api/v1
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
..
activitypub activitypub: warn instead of error 2024-03-24 07:12:31 +01:00
admin add pronoun field to user profiles 2024-04-03 15:11:17 -05:00
misc Port "Fix wrong test usage of AppSubURL" 2024-03-06 21:47:44 +01:00
notify drop log.Error in ReadRepoNotifications 2024-03-24 07:12:31 +01:00
org Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
packages remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
repo Do some performance optimize for issues list and view issue/pull (gitea#29515) 2024-04-08 14:47:31 +02:00
settings Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
shared Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
swagger [BUG] Fix header name in swagger response 2024-02-29 14:08:10 +01:00
user add pronoun field to user profiles 2024-04-03 15:11:17 -05:00
utils Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
api.go Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00