You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/models/repo
Gusted 548adb94b4
Avoid database lookups for `DescriptionHTML` (#18924)
* Avoid database lookups for `DescriptionHTML`

- Don't Compose meta's for DescriptionHTML, they are only needed in
order to correctly format and show issue's but it's highly unlikely that
a repository description will refer to a local issue.

Using 125 Connections for 5 seconds: on `/explore/repos`(which is the most
noticeable usage by this function's database lookups):

Before:

Statistics        Avg      Stdev        Max
  Reqs/sec       569.41     506.05    2715.00
  Latency      214.27ms    16.60ms   294.84ms
  HTTP codes:
    1xx - 0, 2xx - 2974, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    27.17MB/s

After:

Statistics        Avg      Stdev        Max
  Reqs/sec      1585.04     789.84    4144.56
  Latency       78.89ms    15.89ms   206.94ms
  HTTP codes:
    1xx - 0, 2xx - 7975, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    73.85MB/s

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
..
archiver.go format with gofumpt (#18184) 3 years ago
attachment.go format with gofumpt (#18184) 3 years ago
attachment_test.go Move attachment into models/repo/ (#17650) 3 years ago
avatar.go Move repository model into models/repo (#17933) 3 years ago
fork.go Some repository refactors (#17950) 3 years ago
fork_test.go Some repository refactors (#17950) 3 years ago
git.go Move repository model into models/repo (#17933) 3 years ago
issue.go Prevent deadlock in create issue (#17970) 3 years ago
language_stats.go Move repository model into models/repo (#17933) 3 years ago
main_test.go Some repository refactors (#17950) 3 years ago
mirror.go format with gofumpt (#18184) 3 years ago
pushmirror.go format with gofumpt (#18184) 3 years ago
pushmirror_test.go Move repository model into models/repo (#17933) 3 years ago
redirect.go Some repository refactors (#17950) 3 years ago
redirect_test.go Some repository refactors (#17950) 3 years ago
repo.go Avoid database lookups for `DescriptionHTML` (#18924) 3 years ago
repo_indexer.go Move repository model into models/repo (#17933) 3 years ago
repo_list.go Use conditions but not repo ids as query condition (#16839) 3 years ago
repo_test.go Some repository refactors (#17950) 3 years ago
repo_unit.go Refactor auth package (#17962) 3 years ago
star.go Some repository refactors (#17950) 3 years ago
star_test.go Some repository refactors (#17950) 3 years ago
topic.go Some repository refactors (#17950) 3 years ago
topic_test.go Some repository refactors (#17950) 3 years ago
update.go Some repository refactors (#17950) 3 years ago
watch.go Some repository refactors (#17950) 3 years ago
watch_test.go Some repository refactors (#17950) 3 years ago
wiki.go Move repository model into models/repo (#17933) 3 years ago
wiki_test.go Add separate SSH_USER config option (#17584) 3 years ago