refactor(misc): enhance performance on bytes pool, entrypoint, access log and route context handling

- Introduced benchmark tests for Entrypoint and ReverseProxy to evaluate performance.
- Updated Entrypoint's ServeHTTP method to improve route context management.
- Added new test file for entrypoint benchmarks and refined existing tests for route handling.
This commit is contained in:
yusing
2025-09-14 00:03:27 +08:00
parent e0d25e475c
commit f31b1b5ed3
11 changed files with 623 additions and 33 deletions

View File

@@ -20,8 +20,10 @@ func CommaSeperatedList(s string) []string {
return res
}
var caseTitle = cases.Title(language.AmericanEnglish)
func Title(s string) string {
return cases.Title(language.AmericanEnglish).String(s)
return caseTitle.String(s)
}
func ContainsFold(s, substr string) bool {