Web Components Benchmark

Benchmark Web Components technologies with various examples

What's this ?

The purpose of this project is to benchmark all available Web Components technologies with different implementations :

  • simple one with TodoMVC
  • extreme with Pascal Triangle
  • and soon real with RealWorld example implementation

Frequently Asked Questions

Which code is served for the benchmark ?

The demos do not use any Polyfill & are build to ES6/ES2015 code for benchmarks purpose. Please use Chrome, Safari or Firefox > v63.

Where did the benchmarks are running ?

The benchmark is running on Travis during a CI process, results are constant between two builds. Benchmarks are run by the Lighthouse library with fast 4g throttling set up (Network slow down with 4x CPU slower).

Where did the results came from ?

Page load and specific use-cases like creating 50 todos

The benchmark use the great Puppeteer Node.js library for manipulating a Chrome headless instance.
Puppeteer has some APIs for generating a RAW trace file which can be opened in Chrome DevTools or timeline viewer.

The data extracted from the RAW JSON is the "top down tree" total time in DevTools Performance tab of Chrome, which is an addition of scripting, rendering & painting time in the graph below.

Time to interactive

The benchmark use Lighthouse Node.js library under the hood. The Lighthouse configuration use the interactive audit where you can have "Time to interactive" number.

Why two different categories "Libraries or compilers" & "Classic frameworks exporting to Web Components" ?

The first one is for libraries or compilers that are "Web components" friendly first. The second one is for mainstream front-end frameworks which support "Web Components" and can also "export" their own "component" material to standard "Web Components".

When did the last build run ?

The last build run : 04/04/2020 - 13:29:34


Anchors to implementation's results

Todo List | Pascal triangle



Todo List


This benchmark consist of 4 scenarios : page load, create 50 todos, delete 50 todos, editing 50 todos. Lower numbers are better.


Libraries or compilers

Assets size Gzipped
(in Ko)
Page load
(in ms)
Time to interactive
(in ms)
Create 50 todos
(in ms)
Delete 50 todos
(in ms)
Edit 50 todos
(in ms)
Native
 
2.2
37
803
613
474
781
Atomico
1.5.2
250 
4.3
30
780
343
6
13
Hybrids
4.0.2
1288 
7.9
43
947
451
86
104
HyperHTMLElement
3.10.0
141 
12.8
38
971
350
201
79
LitElement
2.2.1
2169 
10.3
43
970
380
249
139
Omi
6.9.0
8900 
11.9
32
1112
512
391
186
Riot
4.4.0
13682 
9.7
41
954
327
117
88
SkateJS & lit-html
0.0.1
2991 
11.3
49
1417
413
7
14
SkateJS & Preact
0.0.1
2991 
16.1
45
1438
395
7
14
Slim.js
4.0.7
643 
5.4
23
964
361
181
51
Solid
0.5.1
533 
7.8
42
934
333
180
100
Stencil
1.3.0
5608 
NaN
22
988
273
74
107
Svelte
3.9.1
17839 
6.5
36
953
306
104
14

Classic frameworks exporting to Web Components

Assets size Gzipped
(in Ko)
Page load
(in ms)
Time to interactive
(in ms)
Create 50 todos
(in ms)
Delete 50 todos
(in ms)
Edit 50 todos
(in ms)
Angular Elements
8.2.3
48702 
133.7
147
3321
428
267
243
Angular Elements Ivy
~8.2.3
48702 
NaN
Vue.js
2.6.10
140129 
40.2
67
1300
401
24
93
Dojo
5.0.4
150 
NaN
55
1507
365
222
138

Pascal triangle


This benchmark display a Pascal Triangle. Lower numbers are better.


Libraries or compilers

Assets size Gzipped
(in Ko)
Page load
(in ms)
Time to interactive
(in ms)
Native
 
1
234
1211
Atomico
1.5.2
250 
3.4
229
1234
Hybrids
4.0.2
1288 
6.6
21
2159
HyperHTMLElement
3.10.0
141 
11.5
14
3062
LitElement
2.2.1
2169 
8.1
702
2352
Omi
6.9.0
8900 
10.5
129
2605
Riot
4.4.0
13682 
8.7
1147
2565
SkateJS & lit-html
0.0.1
2991 
9.4
636
2658
SkateJS & Preact
0.0.1
2991 
8.6
362
2097
Slim.js
4.0.7
643 
4.2
25
5194
Solid
0.5.1
533 
5.9
363
1782
Svelte
3.9.1
17839 
2.8
339
1462

Classic frameworks exporting to Web Components

Assets size Gzipped
(in Ko)
Page load
(in ms)
Time to interactive
(in ms)
Angular Elements
8.2.3
48702 
120.2
565
3587
Angular Elements Ivy
~8.2.3
48702 
20.4
119
1810
Vue.js
2.6.10
140129 
37.5
1580
3801
Dojo
5.0.4
150 
15.6
4026
7162

Web Components Benchmark by Vincent Ogloblinsky. Licensed under MIT.

Page 1 Created with Sketch.