]> source.dussan.org Git - gitea.git/commit
Speed up `enry.IsVendor` (#15213)
authorzeripath <art27@cantab.net>
Thu, 1 Apr 2021 17:41:09 +0000 (18:41 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Apr 2021 17:41:09 +0000 (19:41 +0200)
commitff460ca74d37b1eadac63b8858d0daa1690e0e2f
tree3a04e464fc5e4e6630b31fe4444dd007eb52f799
parent43fb4921e3fb67be9f2f3a6d631a21a3322f492b
Speed up `enry.IsVendor` (#15213)

`enry.IsVendor` is kinda slow as it simply iterates across all regexps.
This PR ajdusts the regexps to combine them to make this process a
little quicker.

Related #15143

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/analyze/vendor.go [new file with mode: 0644]
modules/analyze/vendor_test.go [new file with mode: 0644]
modules/git/repo_language_stats_gogit.go
modules/git/repo_language_stats_nogogit.go
modules/indexer/code/bleve.go
modules/indexer/code/elastic_search.go