Skip to content

Commit ec2d9d0

Browse files
committed
update view benchmarks and remove ace template parser
1 parent bd1a148 commit ec2d9d0

File tree

33 files changed

+45
-885
lines changed

33 files changed

+45
-885
lines changed

HISTORY.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene
1919

2020
**How to upgrade**: Open your command-line and execute this command: `go get github.com/kataras/iris/v12@latest` and `go mod tidy -compat=1.20`.
2121

22+
# Next
23+
24+
Change applies to `master` branch.
25+
26+
- Remove [ace](https://github.com/eknkc/amber) template parser support, as it was discontinued by its author more than five years ago.
27+
2228
# Sa, 11 March 2023 | v12.2.0
2329

2430
This release introduces new features and some breaking changes.
@@ -41,7 +47,7 @@ All new features have been tested in production and seem to work fine. Fixed all
4147
- Add `Context.Render` method for compatibility.
4248

4349
- Support of embedded [locale files](https://github.com/kataras/iris/blob/master/_examples/i18n/template-embedded/main.go) using standard `embed.FS` with the new `LoadFS` function.
44-
- Support of direct embedded view engines (`HTML, Blocks, Django, Handlebars, Pug, Amber, Jet` and `Ace`) with `embed.FS` or `fs.FS` (in addition to `string` and `http.FileSystem` types).
50+
- Support of direct embedded view engines (`HTML, Blocks, Django, Handlebars, Pug, Jet` and `Ace`) with `embed.FS` or `fs.FS` (in addition to `string` and `http.FileSystem` types).
4551
- Add support for `embed.FS` and `fs.FS` on `app.HandleDir`.
4652

4753
- Add `iris.Patches()` package-level function to customize Iris Request Context REST (and more to come) behavior.
@@ -306,7 +312,7 @@ func main() {
306312
- Fix Response Recorder `Clone` concurrent access afterwards.
307313

308314
- Add a `ParseTemplate` method on view engines to manually parse and add a template from a text as [requested](https://github.com/kataras/iris/issues/1617). [Examples](https://github.com/kataras/iris/tree/master/_examples/view/parse-template).
309-
- Full `http.FileSystem` interface support for all **view** engines as [requested](https://github.com/kataras/iris/issues/1575). The first argument of the functions(`HTML`, `Blocks`, `Pug`, `Amber`, `Ace`, `Jet`, `Django`, `Handlebars`) can now be either a directory of `string` type (like before) or a value which completes the `http.FileSystem` interface. The `.Binary` method of all view engines was removed: pass the go-bindata's latest version `AssetFile()` exported function as the first argument instead of string.
315+
- Full `http.FileSystem` interface support for all **view** engines as [requested](https://github.com/kataras/iris/issues/1575). The first argument of the functions(`HTML`, `Blocks`, `Pug`, `Ace`, `Jet`, `Django`, `Handlebars`) can now be either a directory of `string` type (like before) or a value which completes the `http.FileSystem` interface. The `.Binary` method of all view engines was removed: pass the go-bindata's latest version `AssetFile()` exported function as the first argument instead of string.
310316

311317
- Add `Route.ExcludeSitemap() *Route` to exclude a route from sitemap as requested in [chat](https://chat.iris-go.com), also offline routes are excluded automatically now.
312318

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Some of the features Iris offers:
187187
* Builtin support for ngrok to put your app on the internet, the fastest way
188188
* Unique Router with dynamic path as parameter with standard types like :uuid, :string, :int... and the ability to create your own
189189
* Compression
190-
* View Engines (HTML, Django, Amber, Handlebars, Pug/Jade and more)
190+
* View Engines (HTML, Django, Handlebars, Pug/Jade and more)
191191
* Create your own File Server and host your own WebDAV server
192192
* Cache
193193
* Localization (i18n, sitemap)

README_PT_BR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Alguns dos recursos que o Iris Web Framework oferece:
184184
* Suporte integrado para ngrok para colocar seu aplicativo na internet da maneira mais rápida
185185
* Router único com caminho dinâmico como parametro com tipos padrões como :uuid, :string, :int... e a habilidade de criar o seu próprio router
186186
* Compressão
187-
* View Engines (HTML, Django, Amber, Handlebars, Pug/Jade e mais)
187+
* View Engines (HTML, Django, Handlebars, Pug/Jade e mais)
188188
* Cria seu próprio Servidor de Arquivo e hospeda seu próprio servidor WebDAV
189189
* Cache
190190
* Localização (i18n, sitemap)

README_ZH_HANT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Iris 提供了至少這些功能:
195195
- 內建 ngrok 支援,讓您可以把 app 以最快速的方式推上網際網路
196196
- 包含動態路徑、具唯一性的路由,支援如 :uuid:string:int 等等的標準類型,並且可以自己建立
197197
- 壓縮功能
198-
- 檢視 (View) 算繪引擎 (HTML、Django、Amber、Handlebars、Pug/Jade 等等)
198+
- 檢視 (View) 算繪引擎 (HTML、Django、Handlebars、Pug/Jade 等等)
199199
- 建立自己的檔案伺服器,並寄存您自己的 WebDAV 伺服器
200200
- 快取
201201
- 本地化 (i18n、sitemap)

_benchmarks/view/README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
# View Engine Benchmarks
22

3-
Benchmark between all 8 supported template parsers.
3+
Benchmark between all 7 supported template parsers.
44

5-
Amber, Ace and Pug parsers minifies the template before render. So, to have a fair benchmark, we must make sure that the byte amount of the total response body is exactly the same across all. Therefore, all other template files are minified too.
5+
Ace and Pug parsers minifies the template before render. So, to have a fair benchmark, we must make sure that the byte amount of the total response body is exactly the same across all. Therefore, all other template files are minified too.
66

77
![Benchmarks Chart Graph](chart.png)
88

9-
> Last updated: Oct 1, 2020 at 12:46pm (UTC)
9+
> Last updated: Mar 17, 2023 at 10:31am (UTC)
1010
1111
## System
1212

1313
| | |
1414
|----|:---|
15-
| Processor | Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz |
16-
| RAM | 15.85 GB |
17-
| OS | Microsoft Windows 10 Pro |
15+
| Processor | 12th Gen Intel(R) Core(TM) i7-12700H |
16+
| RAM | 15.68 GB |
17+
| OS | Microsoft Windows 11 Pro |
1818
| [Bombardier](https://github.com/codesenberg/bombardier) | v1.2.4 |
19-
| [Go](https://golang.org) | go1.15.2 |
19+
| [Go](https://golang.org) | go1.20.2 |
20+
| [Node.js](https://nodejs.org/) | v19.5.0 |
2021

2122
## Terminology
2223

23-
**Name** is the name of the template engine used under a particular test.
24+
**Name** is the name of the framework(or router) used under a particular test.
2425

2526
**Reqs/sec** is the avg number of total requests could be processed per second (the higher the better).
2627

@@ -38,19 +39,18 @@ Amber, Ace and Pug parsers minifies the template before render. So, to have a fa
3839

3940
| Name | Language | Reqs/sec | Latency | Throughput | Time To Complete |
4041
|------|:---------|:---------|:--------|:-----------|:-----------------|
41-
| [Amber](./amber) | Go |125698 |0.99ms |44.67MB |7.96s |
42-
| [Blocks](./blocks) | Go |123974 |1.01ms |43.99MB |8.07s |
43-
| [Django](./django) | Go |118831 |1.05ms |42.17MB |8.41s |
44-
| [Handlebars](./handlebars) | Go |101214 |1.23ms |35.91MB |9.88s |
45-
| [Pug](./pug) | Go |89002 |1.40ms |31.81MB |11.24s |
46-
| [Ace](./ace) | Go |64782 |1.93ms |22.98MB |15.44s |
47-
| [HTML](./html) | Go |53918 |2.32ms |19.13MB |18.55s |
48-
| [Jet](./jet) | Go |4829 |25.88ms |1.71MB |207.07s |
42+
| [Jet](./jet) | Go |248957 |500.81us |88.26MB |4.02s |
43+
| [Blocks](./blocks) | Go |238854 |521.76us |84.74MB |4.19s |
44+
| [Pug](./pug) | Go |238153 |523.74us |85.07MB |4.20s |
45+
| [Django](./django) | Go |224448 |555.40us |79.61MB |4.46s |
46+
| [Handlebars](./handlebars) | Go |197267 |631.99us |69.96MB |5.07s |
47+
| [Ace](./ace) | Go |157415 |792.53us |55.83MB |6.35s |
48+
| [HTML](./html) | Go |120811 |1.03ms |42.82MB |8.29s |
4949

5050
## How to Run
5151

5252
```sh
53-
$ go install github.com/kataras/server-benchmarks@latest
54-
$ go install github.com/codesenberg/bombardier@latest
53+
$ go install github.com/kataras/server-benchmarks@master
54+
$ go install github.com/codesenberg/bombardier@master
5555
$ server-benchmarks --wait-run=3s -o ./results
5656
```

_benchmarks/view/ace/views/layouts/main.ace

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ html
33
head
44
title {{.Title}}
55
body
6-
{{ yield . . }}
6+
{{ yield . }}
77
footer
88
= include partials/footer.ace .

_benchmarks/view/amber/main.go

-29
This file was deleted.

_benchmarks/view/amber/views/index.amber

-5
This file was deleted.

_benchmarks/view/amber/views/layouts/main.amber

-8
This file was deleted.

_benchmarks/view/amber/views/partials/footer.amber

-2
This file was deleted.

_benchmarks/view/chart.png

5.6 KB
Loading

_benchmarks/view/tests.yml

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
Envs:
1212
- Name: Ace
1313
Dir: ./ace
14-
- Name: Amber
15-
Dir: ./amber
1614
- Name: Blocks
1715
Dir: ./blocks
1816
- Name: Django

_examples/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
* [Overview](view/overview/main.go)
139139
* [Layout](view/layout)
140140
* [Ace](view/layout/ace)
141-
* [Amber](view/layout/amber)
142141
* [Blocks](view/layout/blocks)
143142
* [Django](view/layout/django)
144143
* [Handlebars](view/layout/handlebars)
@@ -160,7 +159,6 @@
160159
* Parse a Template from Text
161160
* [HTML, Pug and Ace](view/parse-parse/main.go)
162161
* [Django](view/parse-parse/django/main.go)
163-
* [Amber](view/parse-parse/amber/main.go)
164162
* [Jet](view/parse-parse/jet/main.go)
165163
* [Handlebars](view/parse-parse/handlebars/main.go)
166164
* [Blocks](view/template_blocks_0)
@@ -170,8 +168,6 @@
170168
* [Pug Embedded`](view/template_pug_2_embedded)
171169
* [Ace](view/template_ace_0)
172170
* [Django](view/template_django_0)
173-
* [Amber](view/template_amber_0)
174-
* [Amber Embedded](view/template_amber_1_embedded)
175171
* [Jet](view/template_jet_0)
176172
* [Jet Embedded](view/template_jet_1_embedded)
177173
* [Jet 'urlpath' tmpl func](view/template_jet_2)

_examples/README_ZH_HANT.md

-4
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
- [概覽](view/overview/main.go)
137137
- [排版引擎](view/layout)
138138
- [Ace](view/layout/ace)
139-
- [Amber](view/layout/amber)
140139
- [Blocks](view/layout/blocks)
141140
- [Django](view/layout/django)
142141
- [Handlebars](view/layout/handlebars)
@@ -158,7 +157,6 @@
158157
- 從文字解析樣板
159158
- [HTML, Pug and Ace](view/parse-parse/main.go)
160159
- [Django](view/parse-parse/django/main.go)
161-
- [Amber](view/parse-parse/amber/main.go)
162160
- [Jet](view/parse-parse/jet/main.go)
163161
- [Handlebars](view/parse-parse/handlebars/main.go)
164162
- [Blocks](view/template_blocks_0)
@@ -168,8 +166,6 @@
168166
- [Pug Embedded`](view/template_pug_2_embedded)
169167
- [Ace](view/template_ace_0)
170168
- [Django](view/template_django_0)
171-
- [Amber](view/template_amber_0)
172-
- [Amber Embedded](view/template_amber_1_embedded)
173169
- [Jet](view/template_jet_0)
174170
- [Jet Embedded](view/template_jet_1_embedded)
175171
- [Jet 'urlpath' tmpl func](view/template_jet_2)

_examples/view/context-view-data/templates/layouts/layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
</head>
66
<body>
77
<!-- Render the current template here -->
8-
{{ yield . . }}
8+
{{ yield . }}
99
</body>
1010
</html>

_examples/view/layout/amber/main.go

-28
This file was deleted.

_examples/view/layout/amber/views/index.amber

-5
This file was deleted.

_examples/view/layout/amber/views/layouts/main.amber

-8
This file was deleted.

_examples/view/layout/amber/views/partials/footer.amber

-2
This file was deleted.

_examples/view/parse-template/amber/main.go

-32
This file was deleted.

_examples/view/template_ace_0/views/index.ace

+2
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
h2 {{.Title}}
44

5+
h3 Body
6+
57
= include partials/footer.ace .

_examples/view/template_amber_0/main.go

-23
This file was deleted.

_examples/view/template_amber_0/views/index.amber

-11
This file was deleted.

_examples/view/template_amber_0/views/layouts/main.amber

-15
This file was deleted.

0 commit comments

Comments
 (0)