Commit Graph

15 Commits

Author SHA1 Message Date
Bo-Yi Wu
6f3d96ccff
chore: improve render string performance (#2365) 2020-05-09 17:41:00 +08:00
Dmitry Kutakov
b056a34bdc fix errcheck warnings (#1739) 2019-01-18 09:32:53 +08:00
田欧
d510595aa5 chore: add some annotations (#1544)
ref: #1075 
because I am not a native English, maybe have a bit problem.
2018-09-15 10:23:32 +08:00
田欧
b7bb9baa64
chore: add missing copyright and update if/else (#1497) 2018-08-19 22:52:43 +08:00
Javier Provecho Fernandez
963acc4b0c Fix #198 (#781)
* Add new function to Render interface for writing content type only

* Add support for the new function in Render interface for writing content-type only

* Fix unhandled merge conflict in context_test.go

* Update vendor.json
2017-01-09 16:24:48 +01:00
Manu Mtz-Almeida
a7c957af7d Adds supports for custom JSON Content-type 2015-06-13 04:29:10 +02:00
Manu Mtz-Almeida
56683d33b1 c.String() performance improvements
```
benchmark                   old ns/op     new ns/op     delta
BenchmarkOneRouteString     448           310           -30.80%

benchmark                   old allocs     new allocs     delta
BenchmarkOneRouteString     1              0              -100.00%

benchmark                   old bytes     new bytes     delta
BenchmarkOneRouteString     48            0             -100.00%
```
2015-06-04 12:53:42 +02:00
Manu Mtz-Almeida
1f56e50083 Using Render() instead of Write() 2015-06-04 05:25:21 +02:00
Manu Mtz-Almeida
835f66fdc9 404 not found performance improvements
benchmark            old ns/op     new ns/op     delta
Benchmark404         737           249           -66.21%
Benchmark404Many     2330          454           -80.52%

benchmark            old allocs     new allocs     delta
Benchmark404         3              0              -100.00%
Benchmark404Many     10             0              -100.00%

benchmark            old bytes     new bytes     delta
Benchmark404         115           68            -40.87%
Benchmark404Many     235           57            -75.74%
2015-05-30 14:45:13 +02:00
Manu Mtz-Almeida
a2105ce34c Fast path for setting headers.
- No heap allocation
- No indirection
- CanonicalMIMEHeaderKey() is not called
2015-05-23 16:39:25 +02:00
Manu Mtz-Almeida
ffaf49da0e Adds MIT license 2015-05-22 19:21:23 +02:00
Manu Mtz-Almeida
306da81aaf Cosmetic changes in render 2015-05-22 04:44:29 +02:00
Manu Mtz-Almeida
947b53d4a2 New Render API 2015-05-18 15:45:24 +02:00
Manu Mtz-Almeida
a9dad532ae Performance improvement in renders 2015-05-11 01:02:17 +02:00
Manu Mtz-Almeida
2d8f0a4801 Performance improvements when rendering
- Fast path for JSON, XML and plain text rendering
2015-05-07 12:44:52 +02:00