Releases: aerogo/aero
1.3.44
1.3.42
1.3.41
With the performance improvements in this release, Aero performed best out of all routers in most of the benchmarks I tested.
See the benchmarks and try to run them on your own machine, the results might differ.
Make sure you also run the latest version of each router when benchmarking.
1.3.40
1.3.38
This releases focuses on reducing the router tree memory usage.
The router tree memory usage in the GitHub benchmark went down from 800 KB to 135 KB, effectively reducing the required memory by 83%.
As a side effect, this also improved the lookup performance by another 5-10%.
1.3.37
1.3.0
With this release comes an apology to the community.
Due to differences in opinions regarding the semver implementation in Go modules, this release will come as minor number upgrade even though it was intended to be a major version upgrade. I highly apologize for the troubles this causes, but I will try my best to make the upgrade process as painless as possible.
Upgrade
If you have an existing Aero project, you can perform 99% of the upgrades automatically via Search & Replace.
Open your project files and replace everything listed here by the upcoming line:
*aero.Context
aero.Context
*aero.RewriteContext
aero.RewriteContext
aero.Context) string {
aero.Context) error {
aero.Handle
aero.Handler
ctx.Request().Header().Get(
ctx.Request().Header(
ctx.Response().Header().Set(
ctx.Response().SetHeader(
ctx.URI()
ctx.Path()
ctx.SetURI(
ctx.SetPath(
app.Handler().ServeHTTP(
app.ServeHTTP(
ctx.StatusCode
ctx.Status()
ctx.RealIP()
ctx.IP()
Example: Search for *aero.Context
and replace it with aero.Context
in all .go
files. The same applies to the rest.
This should take care of all the necessary API changes.
Benefits
API
Aero now has a much cleaner API compared to before. Several barely used functions have been removed in favor of delivering a cleaner interface.
Performance
Aero has become an extremely fast server package, outperforming both echo and gin:
BenchmarkAeroStatic-12 100000 16643 ns/op 700 B/op 0 allocs/op
BenchmarkAeroGitHubAPI-12 50000 27487 ns/op 1409 B/op 0 allocs/op
BenchmarkAeroGplusAPI-12 1000000 1390 ns/op 69 B/op 0 allocs/op
BenchmarkAeroParseAPI-12 500000 2558 ns/op 138 B/op 0 allocs/op
BenchmarkEchoStatic-12 50000 30702 ns/op 1950 B/op 157 allocs/op
BenchmarkEchoGitHubAPI-12 30000 45431 ns/op 2782 B/op 203 allocs/op
BenchmarkEchoGplusAPI-12 500000 2500 ns/op 173 B/op 13 allocs/op
BenchmarkEchoParseAPI-12 300000 4234 ns/op 323 B/op 26 allocs/op
BenchmarkGinStatic-12 50000 37885 ns/op 8231 B/op 157 allocs/op
BenchmarkGinGitHubAPI-12 30000 55092 ns/op 10903 B/op 203 allocs/op
BenchmarkGinGplusAPI-12 500000 3059 ns/op 693 B/op 13 allocs/op
BenchmarkGinParseAPI-12 300000 5687 ns/op 1363 B/op 26 allocs/op
What if I'm not ready to upgrade?
If you are not ready to upgrade yet, you can use exclude
statements in your go.mod
file:
exclude github.com/aerogo/aero v1.3.0
1.2.0
The web manifest is no longer included in the Aero configuration as it has nothing to do with the web server functionalities and has now been separated to a different package: aerogo/manifest
This means that if you relied on loading the web manifest data from config.json
, you should now create a separate manifest.json
and load it via manifest.FromFile("manifest.json")
.
This change is required as not every web server absolutely needs to have a web manifest file. For those who need it, please see the linked package above.
1.1.17
1.1.0
This release includes a 10x performance improvement for most gzip based responses.
It also nearly halves the amount of allocations and considerably lowers the total memory usage.
This is possible thanks to the re-use of gzip writers via sync.Pool
in version 1.1.0.
Benchmark comparison using ~10 KB responses:
Aero 1.0.6:
BenchmarkBigResponse-12 20000 71625 ns/op 815383 B/op 38 allocs/op
Aero 1.1.0:
BenchmarkBigResponse-12 200000 7228 ns/op 1834 B/op 21 allocs/op