bench-forgejo/routers/web
Gusted 076eaad743
Improve dashboard's repo list performance (#18963)
* Improve dashboard's repo list performance

- Avoid a lot of database lookups for all the repo's, by adding a
undocumented "minimal" mode for this specific task, which returns the
data that's only needed by this list which doesn't require any database
lookups.
- Makes fetching these list faster.
- Less CPU overhead when a user visits home page.

* Refactor javascript code + fix Fork icon

- Use async in the function so we can use `await`.
- Remove `archivedFilter` check for count, as it doesn't make sense to
  show the count of repos when you can't even see them(as they are
  filited away).

* Add `count_only`

* Remove uncessary code

* Improve comment

Co-authored-by: delvh <dev.lh@web.de>

* Update web_src/js/components/DashboardRepoList.js

Co-authored-by: delvh <dev.lh@web.de>

* Update web_src/js/components/DashboardRepoList.js

Co-authored-by: delvh <dev.lh@web.de>

* By default apply minimal mode

* Remove `minimal` paramater

* Refactor count header

* Simplify init

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2022-04-26 16:34:30 -04:00
..
admin Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
auth Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
dev Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
events Improve Stopwatch behavior (#18930) 2022-04-25 22:45:22 +02:00
explore Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
feed Add ContextUser to http request context (#18798) 2022-03-26 17:04:22 +08:00
misc Fix panic in team repos API (#19431) 2022-04-20 18:43:26 +08:00
org Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
repo Improve dashboard's repo list performance (#18963) 2022-04-26 16:34:30 -04:00
user User specific repoID or xorm builder conditions for issue search (#19475) 2022-04-25 16:06:24 +02:00
auth.go Let web and API routes have different auth methods group (#19168) 2022-03-28 12:46:28 +08:00
auth_windows.go Let web and API routes have different auth methods group (#19168) 2022-03-28 12:46:28 +08:00
base.go Update HTTP status codes to modern codes (#18063) 2022-03-23 12:54:07 +08:00
goget.go Refactor legacy unknwon/com package, improve golangci lint (#19284) 2022-04-01 16:47:50 +08:00
home.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
metrics.go Update HTTP status codes to modern codes (#18063) 2022-03-23 12:54:07 +08:00
nodeinfo.go Add nodeinfo endpoint for federation purposes (#16953) 2021-09-28 01:38:06 +02:00
swagger_json.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
web.go Fix middleware function's placements for some /user/... (#19377) 2022-04-12 10:02:58 +08:00