9 Commits

Author SHA1 Message Date
Erik Dubbelboer d356cacd84 Implement io.StringWriter on some more types (#2023)
In theory this can optimize some code paths where a string first needs
to be converted to a []byte to use the normal Write method. By
implementing WriteString this extra copy isn't needed. Internall we
don't do the copy and just use s2b instead.
2025-06-19 08:59:25 +02:00
Juan Calderon-Perez 1fb3453165 Use Named Fields and Align Structures to Reduce Memory Usage (#1814)
* Use Named fields and Align Structures to Reduce Memory Usage

* Remove extra spaces
2024-08-02 22:26:52 +02:00
Oleksandr Redko f196617f55 chore: Use 'any' instead of 'interface{}' (#1666)
gofmt -w -r "interface{} -> any" -l .
2023-11-24 11:33:04 +01:00
Gusted 1834cecd7e Lazy load stackless functions (#1656)
- I noticed that fasthttp was taking up 1.8MB of heap memory, even
though it wasn't being used. This turned out to be the stackless
function: 1.80MB  github.com/valyala/fasthttp/stackless.NewFunc
- Lazy load the stackless functions with sync.Once, given this a simple
atomic read, it shouldn't affect performance for the fast-path (I
haven't seen benchmarks with compression enabled).
2023-11-12 16:36:57 +01:00
Erik Dubbelboer 32793db72d Run golangci-lint using a Github Action 2019-11-16 18:09:28 +01:00
Kirill Danshin 110dea26f8 ci, reuseport, writer: update travis config and goimports -w on whole project
Signed-off-by: Kirill Danshin <kirill@danshin.pro>
2018-08-12 23:56:32 +03:00
Aliaksandr Valialkin 5abb44878e stackless: added NewFunc() for wrapping stack-hungry CPU-bound functions 2017-02-05 23:35:23 +02:00
Aliaksandr Valialkin 89fe89ae74 stackless: optimization: do not issue zero-length writes to underlying writer 2016-11-11 15:16:52 +02:00
Aliaksandr Valialkin f49c6b3f96 Reduce stack space usage when using response compression 2016-11-03 19:38:42 +02:00