Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke setState callbacks setup in componentWillMount #3806

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

andrewiggins
Copy link
Member

Fixes #556

@github-actions
Copy link

github-actions bot commented Nov 19, 2022

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -9% - +12% (-6.80ms - +9.69ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -3% - +5% (-0.84ms - +1.56ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +1% (-7.26ms - +22.25ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -3% - +2% (-0.94ms - +0.50ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -4% - +1% (-6.85ms - +2.59ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -5% - +0% (-1.54ms - +0.16ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -2% - +3% (-0.05ms - +0.08ms)
    preact-local vs preact-master
  • todo: unsure 🔍 -2% - +1% (-1.07ms - +0.84ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -9% - +6% (-0.38ms - +0.26ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -0% - -0% (-0.00ms - -0.00ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -2% - +1% (-0.33ms - +0.19ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -0% - -0% (-0.00ms - -0.00ms)
    preact-local vs preact-master
  • todo: unsure 🔍 -0% - +1% (-0.00ms - +0.01ms)
    preact-local vs preact-master

Results

02_replace1k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master73.07ms - 84.92ms-unsure 🔍
-12% - +8%
-9.69ms - +6.80ms
unsure 🔍
-13% - +6%
-10.94ms - +5.32ms
preact-local74.70ms - 86.18msunsure 🔍
-9% - +12%
-6.80ms - +9.69ms
-unsure 🔍
-11% - +8%
-9.37ms - +6.63ms
preact-hooks76.23ms - 87.38msunsure 🔍
-7% - +14%
-5.32ms - +10.94ms
unsure 🔍
-8% - +12%
-6.63ms - +9.37ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.92ms - 4.38ms-unsure 🔍
-6% - +9%
-0.26ms - +0.38ms
unsure 🔍
-6% - +9%
-0.25ms - +0.38ms
preact-local3.87ms - 4.31msunsure 🔍
-9% - +6%
-0.38ms - +0.26ms
-unsure 🔍
-7% - +8%
-0.30ms - +0.31ms
preact-hooks3.87ms - 4.30msunsure 🔍
-9% - +6%
-0.38ms - +0.25ms
unsure 🔍
-8% - +7%
-0.31ms - +0.30ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.70ms - 0.73ms-unsure 🔍
-5% - +4%
-0.03ms - +0.03ms
unsure 🔍
-3% - +4%
-0.02ms - +0.03ms
preact-local0.69ms - 0.74msunsure 🔍
-4% - +5%
-0.03ms - +0.03ms
-unsure 🔍
-3% - +5%
-0.02ms - +0.04ms
preact-hooks0.69ms - 0.73msunsure 🔍
-4% - +3%
-0.03ms - +0.02ms
unsure 🔍
-5% - +3%
-0.04ms - +0.02ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.42ms - 0.59ms-unsure 🔍
-36% - +9%
-0.23ms - +0.07ms
unsure 🔍
-21% - +25%
-0.10ms - +0.12ms
preact-local0.46ms - 0.71msunsure 🔍
-15% - +46%
-0.07ms - +0.23ms
-unsure 🔍
-13% - +49%
-0.06ms - +0.24ms
preact-hooks0.42ms - 0.57msunsure 🔍
-24% - +20%
-0.12ms - +0.10ms
unsure 🔍
-38% - +7%
-0.24ms - +0.06ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.26ms - 0.30ms-unsure 🔍
-7% - +11%
-0.02ms - +0.03ms
unsure 🔍
-9% - +11%
-0.03ms - +0.03ms
preact-local0.26ms - 0.29msunsure 🔍
-11% - +6%
-0.03ms - +0.02ms
-unsure 🔍
-11% - +9%
-0.03ms - +0.02ms
preact-hooks0.26ms - 0.30msunsure 🔍
-11% - +9%
-0.03ms - +0.03ms
unsure 🔍
-9% - +11%
-0.02ms - +0.03ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.26ms - 0.50ms-unsure 🔍
-50% - +43%
-0.20ms - +0.17ms
faster ✔
34% - 75%
0.16ms - 0.75ms
preact-local0.25ms - 0.54msunsure 🔍
-46% - +53%
-0.17ms - +0.20ms
-faster ✔
30% - 76%
0.13ms - 0.75ms
preact-hooks0.56ms - 1.10msslower ❌
20% - 218%
0.16ms - 0.75ms
slower ❌
8% - 216%
0.13ms - 0.75ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.16ms - 0.21ms-unsure 🔍
-16% - +17%
-0.03ms - +0.03ms
unsure 🔍
-24% - +14%
-0.05ms - +0.03ms
preact-local0.17ms - 0.20msunsure 🔍
-17% - +15%
-0.03ms - +0.03ms
-unsure 🔍
-23% - +12%
-0.05ms - +0.03ms
preact-hooks0.17ms - 0.23msunsure 🔍
-16% - +27%
-0.03ms - +0.05ms
unsure 🔍
-14% - +26%
-0.03ms - +0.05ms
-

run-final

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.19ms - 0.22ms-unsure 🔍
-22% - +3%
-0.05ms - +0.01ms
unsure 🔍
-19% - +3%
-0.04ms - +0.01ms
preact-local0.20ms - 0.25msunsure 🔍
-5% - +26%
-0.01ms - +0.05ms
-unsure 🔍
-11% - +15%
-0.03ms - +0.03ms
preact-hooks0.20ms - 0.24msunsure 🔍
-4% - +21%
-0.01ms - +0.04ms
unsure 🔍
-14% - +11%
-0.03ms - +0.03ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master32.30ms - 33.88ms-unsure 🔍
-5% - +2%
-1.56ms - +0.84ms
unsure 🔍
-2% - +5%
-0.64ms - +1.59ms
preact-local32.55ms - 34.36msunsure 🔍
-3% - +5%
-0.84ms - +1.56ms
-unsure 🔍
-1% - +6%
-0.36ms - +2.04ms
preact-hooks31.82ms - 33.40msunsure 🔍
-5% - +2%
-1.59ms - +0.64ms
unsure 🔍
-6% - +1%
-2.04ms - +0.36ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.46ms - 3.47ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
faster ✔
0% - 1%
0.01ms - 0.02ms
preact-local3.46ms - 3.46msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-faster ✔
0% - 1%
0.02ms - 0.03ms
preact-hooks3.48ms - 3.48msslower ❌
0% - 1%
0.01ms - 0.02ms
slower ❌
0% - 1%
0.02ms - 0.03ms
-
07_create10k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1941.59ms - 1963.71ms-unsure 🔍
-1% - +0%
-22.25ms - +7.26ms
unsure 🔍
-2% - +0%
-30.68ms - +2.81ms
preact-local1950.38ms - 1969.92msunsure 🔍
-0% - +1%
-7.26ms - +22.25ms
-unsure 🔍
-1% - +0%
-22.36ms - +9.49ms
preact-hooks1954.01ms - 1979.16msunsure 🔍
-0% - +2%
-2.81ms - +30.68ms
unsure 🔍
-0% - +1%
-9.49ms - +22.36ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master25.51ms - 25.52ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
unsure 🔍
-0% - +0%
-0.02ms - +0.01ms
preact-local25.50ms - 25.52msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-unsure 🔍
-0% - +0%
-0.03ms - +0.01ms
preact-hooks25.51ms - 25.54msunsure 🔍
-0% - +0%
-0.01ms - +0.02ms
unsure 🔍
-0% - +0%
-0.01ms - +0.03ms
-
filter_list

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master30.01ms - 31.03ms-unsure 🔍
-2% - +3%
-0.50ms - +0.94ms
unsure 🔍
-4% - +3%
-1.20ms - +1.07ms
preact-local29.80ms - 30.80msunsure 🔍
-3% - +2%
-0.94ms - +0.50ms
-unsure 🔍
-5% - +3%
-1.41ms - +0.84ms
preact-hooks29.57ms - 31.60msunsure 🔍
-4% - +4%
-1.07ms - +1.20ms
unsure 🔍
-3% - +5%
-0.84ms - +1.41ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.61ms - 1.61ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.02ms
preact-local1.61ms - 1.61msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-faster ✔
1% - 1%
0.02ms - 0.02ms
preact-hooks1.63ms - 1.63msslower ❌
1% - 1%
0.02ms - 0.02ms
slower ❌
1% - 1%
0.02ms - 0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master178.67ms - 185.95ms-unsure 🔍
-1% - +4%
-2.59ms - +6.85ms
unsure 🔍
-3% - +2%
-5.75ms - +4.40ms
preact-local177.18ms - 183.19msunsure 🔍
-4% - +1%
-6.85ms - +2.59ms
-unsure 🔍
-4% - +1%
-7.45ms - +1.84ms
preact-hooks179.45ms - 186.53msunsure 🔍
-2% - +3%
-4.40ms - +5.75ms
unsure 🔍
-1% - +4%
-1.84ms - +7.45ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master17.89ms - 18.24ms-unsure 🔍
-1% - +2%
-0.19ms - +0.33ms
unsure 🔍
-1% - +3%
-0.27ms - +0.46ms
preact-local17.80ms - 18.19msunsure 🔍
-2% - +1%
-0.33ms - +0.19ms
-unsure 🔍
-2% - +2%
-0.35ms - +0.40ms
preact-hooks17.65ms - 18.29msunsure 🔍
-3% - +1%
-0.46ms - +0.27ms
unsure 🔍
-2% - +2%
-0.40ms - +0.35ms
-
many_updates

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master30.20ms - 31.42ms-unsure 🔍
-1% - +5%
-0.16ms - +1.54ms
slower ❌
0% - 7%
0.14ms - 1.92ms
preact-local29.53ms - 30.71msunsure 🔍
-5% - +0%
-1.54ms - +0.16ms
-unsure 🔍
-2% - +4%
-0.54ms - +1.22ms
preact-hooks29.13ms - 30.44msfaster ✔
0% - 6%
0.14ms - 1.92ms
unsure 🔍
-4% - +2%
-1.22ms - +0.54ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master4.64ms - 4.65ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
faster ✔
0% - 1%
0.02ms - 0.03ms
preact-local4.65ms - 4.65msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks4.67ms - 4.67msslower ❌
0% - 1%
0.02ms - 0.03ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
text_update

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master2.97ms - 3.04ms-unsure 🔍
-3% - +2%
-0.08ms - +0.05ms
faster ✔
2% - 5%
0.08ms - 0.17ms
preact-local2.97ms - 3.07msunsure 🔍
-2% - +3%
-0.05ms - +0.08ms
-faster ✔
2% - 5%
0.05ms - 0.16ms
preact-hooks3.10ms - 3.15msslower ❌
2% - 6%
0.08ms - 0.17ms
slower ❌
2% - 5%
0.05ms - 0.16ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.82ms - 0.82ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
faster ✔
2% - 2%
0.01ms - 0.01ms
preact-local0.82ms - 0.82msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-faster ✔
2% - 2%
0.01ms - 0.01ms
preact-hooks0.84ms - 0.84msslower ❌
2% - 2%
0.01ms - 0.01ms
slower ❌
2% - 2%
0.01ms - 0.01ms
-
todo

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master55.19ms - 56.66ms-unsure 🔍
-2% - +2%
-0.84ms - +1.07ms
unsure 🔍
-4% - +0%
-2.30ms - +0.02ms
preact-local55.20ms - 56.42msunsure 🔍
-2% - +1%
-1.07ms - +0.84ms
-faster ✔
0% - 4%
0.17ms - 2.35ms
preact-hooks56.16ms - 57.96msunsure 🔍
-0% - +4%
-0.02ms - +2.30ms
slower ❌
0% - 4%
0.17ms - 2.35ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.10ms - 1.11ms-unsure 🔍
-1% - +0%
-0.01ms - +0.00ms
faster ✔
2% - 4%
0.03ms - 0.04ms
preact-local1.11ms - 1.11msunsure 🔍
-0% - +1%
-0.00ms - +0.01ms
-faster ✔
2% - 3%
0.02ms - 0.03ms
preact-hooks1.13ms - 1.14msslower ❌
2% - 4%
0.03ms - 0.04ms
slower ❌
2% - 3%
0.02ms - 0.03ms
-

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Nov 19, 2022

Coverage Status

Coverage remained the same at 99.531% when pulling cf08d5a on componentWillMount-setState-callback into 4a37c99 on master.

@github-actions
Copy link

Size Change: -10 B (0%)

Total Size: 52.9 kB

Filename Size Change
dist/preact.js 4.05 kB -3 B (0%)
dist/preact.min.js 4.08 kB -2 B (0%)
dist/preact.min.module.js 4.07 kB -1 B
dist/preact.min.umd.js 4.1 kB -2 B (0%)
dist/preact.module.js 4.07 kB -2 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.81 kB 0 B
compat/dist/compat.module.js 3.75 kB 0 B
compat/dist/compat.umd.js 3.87 kB 0 B
debug/dist/debug.js 3.01 kB 0 B
debug/dist/debug.module.js 3.01 kB 0 B
debug/dist/debug.umd.js 3.09 kB 0 B
devtools/dist/devtools.js 231 B 0 B
devtools/dist/devtools.module.js 240 B 0 B
devtools/dist/devtools.umd.js 315 B 0 B
dist/preact.umd.js 4.12 kB 0 B
hooks/dist/hooks.js 1.49 kB 0 B
hooks/dist/hooks.module.js 1.52 kB 0 B
hooks/dist/hooks.umd.js 1.57 kB 0 B
jsx-runtime/dist/jsxRuntime.js 358 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 324 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 439 B 0 B
test-utils/dist/testUtils.js 442 B 0 B
test-utils/dist/testUtils.module.js 444 B 0 B
test-utils/dist/testUtils.umd.js 526 B 0 B

compressed-size-action

@andrewiggins andrewiggins merged commit d4089df into master Nov 22, 2022
@andrewiggins andrewiggins deleted the componentWillMount-setState-callback branch November 22, 2022 06:35
andrewiggins added a commit that referenced this pull request Nov 22, 2022
Cherry-picked from:

Invoke setState callbacks setup in componentWillMount (#3806)
andrewiggins added a commit that referenced this pull request Nov 23, 2022
Cherry-picked from:

Invoke setState callbacks setup in componentWillMount (#3806)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callback of setState is called at not expected time.
4 participants