Commit Graph
4 Commits
Author SHA1 Message Date
ae0af8ea5b Refactor Git Attribute & performance optimization (#34154)
This PR moved git attributes related code to `modules/git/attribute` sub
package and moved language stats related code to
`modules/git/languagestats` sub package to make it easier to maintain.

And it also introduced a performance improvement which use the `git
check-attr --source` which can be run in a bare git repository so that
we don't need to create a git index file. The new parameter need a git
version >= 2.40 . If git version less than 2.40, it will fall back to
previous implementation.

---------

Co-authored-by: wxiaoguang <[email protected]>
Co-authored-by: yp05327 <[email protected]>
2025-04-11 21:41:29 +08:00
68731c07c5 Reduce integration test overhead (#32475)
In profiling integration tests, I found a couple places where per-test
overhead could be reduced:

* Avoiding disk IO by synchronizing instead of deleting & copying test
Git repository data. This saves ~100ms per test on my machine
* When flushing queues in `PrintCurrentTest`, invoke `FlushWithContext`
in a parallel.

---------

Co-authored-by: wxiaoguang <[email protected]>
2024-11-14 19:28:46 +00:00
techknowlogickandGitHub 0b15a729cf rm .sample hooks which aren't used (#19101) 2022-03-16 10:33:07 +00:00
b231d0deab Ignore Sync errors on pipes when doing CheckAttributeReader.CheckPath, fix the hang of git cat-file (#17096)
* Ignore Sync errors on pipes when doing `CheckAttributeReader.CheckPath`

* apply env patch

* Drop the Sync and fix a number of issues with the Close function

Signed-off-by: Andrew Thornton <[email protected]>

* add logs for DBIndexer and CheckPath

* Fix some more closing bugs

Signed-off-by: Andrew Thornton <[email protected]>

* Add test case for language_stats

Signed-off-by: Andrew Thornton <[email protected]>

* Update modules/indexer/stats/db.go

Co-authored-by: Lauris BH <[email protected]>

Co-authored-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: 6543 <[email protected]>
2021-09-20 20:46:51 +01:00