gitea/modules/indexer/code
Giteabot e536d18fe5
Refactor the usage of batch catfile (#31754) (#31889)
Backport #31754 by @lunny

When opening a repository, it will call `ensureValidRepository` and also
`CatFileBatch`. But sometimes these will not be used until repository
closed. So it's a waste of CPU to invoke 3 times git command for every
open repository.

This PR removed all of these from `OpenRepository` but only kept
checking whether the folder exists. When a batch is necessary, the
necessary functions will be invoked.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-08-21 01:55:14 +08:00
..
bleve Refactor the usage of batch catfile (#31754) (#31889) 2024-08-21 01:55:14 +08:00
elasticsearch Refactor the usage of batch catfile (#31754) (#31889) 2024-08-21 01:55:14 +08:00
internal Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724) 2024-03-16 10:32:45 +00:00
git.go Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724) 2024-03-16 10:32:45 +00:00
indexer_test.go Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724) 2024-03-16 10:32:45 +00:00
indexer.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
search.go Render embedded code preview by permlink in markdown (#30234) 2024-04-02 17:48:27 +00:00