nytimes / gziphandler

Go middleware to gzip HTTP responses
https://godoc.org/github.com/NYTimes/gziphandler
Apache License 2.0
868 stars 129 forks source link

Avoid unnecessary pointer chasing #100

Closed CAFxX closed 3 years ago

CAFxX commented 4 years ago

Avoid unnecessary pointer chasing in the pool slice. It can contain the pools directly.

CAFxX commented 4 years ago

Considered it, but that has no bearing over runtime performance (addLevelPool is executed only at startup), so it felt unrelated to the PR. Furthermore, it seems clearer to keep the full assignment of Pool, as that makes it clear that we're resetting the pool itself (nor that it matters currently, but it may in the future)