1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

perf(fetcher): pre-allocate the cipherSuites

This commit is contained in:
jvoisin 2025-06-17 16:27:18 +02:00
parent d291d6a74d
commit 26add9e833

View file

@ -130,7 +130,7 @@ func (r *RequestBuilder) ExecuteRequest(requestURL string) (*http.Response, erro
// and the insecure ones if we are ignoring TLS errors. This allows to connect to badly configured servers anyway
ciphers = append(ciphers, tls.InsecureCipherSuites()...)
}
cipherSuites := []uint16{}
cipherSuites := make([]uint16, 0, len(ciphers))
for _, cipher := range ciphers {
cipherSuites = append(cipherSuites, cipher.ID)
}