1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-08 00:44:26 +00:00
gitea/routers/api
Lunny Xiao f4ccbd38dc
Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987)
The latest commit cache is currently used only for listing tree files.
However, a cold start may take longer than directly invoking the Git
command. This PR addresses the issue of slow response times when
accessing raw files, improving performance in such scenarios.

```log
gitea.log:105521:2024/12/23 08:22:18 ...eb/routing/logger.go:68:func1() [W] router: slow      GET /xxxx/xxxxxx/raw/commit/xxxxxxxxxxxxxxxxxxxxxxxxxxx/.editorconfig for 172.18.0.5:53252, elapsed 3526.8ms @ repo/download.go:117(repo.SingleDownload)
```
2024-12-30 03:30:01 +00:00
..
actions Refactor "string truncate" (#32984) 2024-12-26 11:56:03 +08:00
packages Refactor arch route handlers (#32993) 2024-12-28 03:31:46 +00:00
v1 Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987) 2024-12-30 03:30:01 +00:00