Skip to content

Instantly share code, notes, and snippets.

@andrewiggins
Last active March 27, 2018 13:21
Show Gist options
  • Save andrewiggins/19c2a1932a2540d343076434919c541b to your computer and use it in GitHub Desktop.
Save andrewiggins/19c2a1932a2540d343076434919c541b to your computer and use it in GitHub Desktop.
Preact componentDidCatch performance

Preact componentDidCatch performance

Environment

  • The benchmark was run on a HP Z440 (3.5 GHz Intel Xeon E5-1650 v3, 32 GB RAM, Windows 10 1709, Chrome 64.0.3282.186 (64-bit))
  • Ran npm run selenium -- --count 10 --framework preact in the webdriver-ts of this js-framework-benchmarks fork

Duration in milliseconds ± standard deviation (Slowdown = Duration / Fastest)

Name preact-v8.2.7-keyed preact-componentDidCatch-keyed
create rows
Duration for creating 1000 rows after the page loaded.
171.4 ± 20.5
(1.0)
190.6 ± 23.5
(1.1)
replace all rows
Duration for updating all 1000 rows of the table (with 5 warmup iterations).
167.0 ± 13.6
(1.0)
164.1 ± 6.4
(1.0)
partial update
Time to update the text of every 10th row (with 5 warmup iterations) for a table with 10k rows.
140.7 ± 11.7
(1.0)
143.5 ± 12.3
(1.0)
select row
Duration to highlight a row in response to a click on the row. (with 5 warmup iterations).
10.5 ± 4.4
(1.0)
7.2 ± 2.3
(1.0)
swap rows
Time to swap 2 rows on a 1K table. (with 5 warmup iterations).
20.8 ± 4.1
(1.0)
23.3 ± 4.9
(1.1)
remove row
Duration to remove a row. (with 5 warmup iterations).
66.2 ± 10.4
(1.1)
60.8 ± 9.8
(1.0)
create many rows
Duration to create 10,000 rows
1,997.7 ± 89.0
(1.0)
2,021.6 ± 77.4
(1.0)
append rows to large table
Duration for adding 1000 rows on a table of 10,000 rows.
343.1 ± 21.9
(1.0)
339.2 ± 21.6
(1.0)
clear rows
Duration to clear the table filled with 10.000 rows.
260.3 ± 11.7
(1.0)
254.0 ± 5.9
(1.0)
slowdown geometric mean 1.02 1.03

Startup metrics

Name preact-v8.2.7-keyed preact-componentDidCatch-keyed
consistently interactive
a pessimistic TTI - when the CPU and network are both definitely very idle. (no more CPU tasks over 50ms)
75.8 ± 16.8
(1.3)
60.5 ± 7.2
(1.0)
script bootup time
the total ms required to parse/compile/evaluate all the page's scripts
10.2 ± 2.5
(1.0)
8.8 ± 1.3
(1.0)
main thread work cost
total amount of time spent doing work on the main thread. includes style/layout/etc.
168.0 ± 14.6
(1.0)
167.4 ± 11.8
(1.0)
total byte weight
network transfer cost (post-compression) of all the resources loaded into the page.
170,577.0 ± 0.0
(1.0)
170,856.0 ± 0.0
(1.0)

Memory allocation in MBs ± standard deviation

Name preact-v8.2.7-keyed preact-componentDidCatch-keyed
ready memory
Memory usage after page load.
2.9 ± 0.2
(1.0)
2.9 ± 0.2
(1.0)
run memory
Memory usage after adding 1000 rows.
5.8 ± 0.0
(1.0)
5.8 ± 0.0
(1.0)
update eatch 10th row for 1k rows (5 cycles)
Memory usage after clicking update every 10th row 5 times
5.9 ± 0.0
(1.0)
5.9 ± 0.0
(1.0)
replace 1k rows (5 cycles)
Memory usage after clicking create 1000 rows 5 times
8.6 ± 0.0
(1.0)
8.6 ± 0.0
(1.0)
creating/clearing 1k rows (5 cycles)
Memory usage after creating and clearing 1000 rows 5 times
5.9 ± 0.0
(1.0)
5.9 ± 0.0
(1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment