perf: various optimizations (#2175)

This commit is contained in:
Kévin Dunglas
2026-02-11 15:21:55 +01:00
committed by GitHub
parent d704e60bb0
commit 040ce55e17
15 changed files with 192 additions and 123 deletions

View File

@@ -198,6 +198,9 @@ func go_get_custom_php_ini(disableTimeouts C.bool) *C.char {
// Pass the php.ini overrides to PHP before startup
// TODO: if needed this would also be possible on a per-thread basis
var overrides strings.Builder
// 32 is an over-estimate for php.ini settings
overrides.Grow(len(mainThread.phpIni) * 32)
for k, v := range mainThread.phpIni {
overrides.WriteString(k)
overrides.WriteByte('=')