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

chore: refocus element after a diff #4244

Closed
wants to merge 4 commits into from
Closed

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Dec 29, 2023

This adds back the focussing of elements, this now only happens after committing the root rather than performing this check on every phase of child-diffing. This PR mainly checks whether it's worth the byte-size and to start a discussion

Fixes #4235
Fixes #3242

Copy link

github-actions bot commented Dec 29, 2023

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -1% - +1% (-0.86ms - +0.74ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -4% - +5% (-1.28ms - +1.49ms)
    preact-local vs preact-main
  • 07_create10k: unsure 🔍 -1% - +0% (-7.16ms - +4.10ms)
    preact-local vs preact-main
  • filter_list: unsure 🔍 -0% - +1% (-0.06ms - +0.18ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +3% (-1.62ms - +2.69ms)
    preact-local vs preact-main
  • many_updates: slower ❌ 0% - 5% (0.05ms - 0.84ms)
    preact-local vs preact-main
  • text_update: slower ❌ 3% - 7% (0.07ms - 0.18ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +0% (-0.21ms - +0.10ms)
    preact-local vs preact-main

usedJSHeapSize

  • 02_replace1k: unsure 🔍 +0% - +0% (+0.00ms - +0.01ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • 07_create10k: unsure 🔍 +0% - +0% (+0.01ms - +0.01ms)
    preact-local vs preact-main
  • filter_list: slower ❌ 0% - 1% (0.01ms - 0.01ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 +0% - +0% (+0.00ms - +0.01ms)
    preact-local vs preact-main
  • text_update: slower ❌ 1% - 4% (0.01ms - 0.03ms)
    preact-local vs preact-main
  • todo: slower ❌ 1% - 1% (0.01ms - 0.01ms)
    preact-local vs preact-main

Results

02_replace1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main81.56ms - 82.75ms-unsure 🔍
-1% - +1%
-0.74ms - +0.86ms
unsure 🔍
-1% - +1%
-0.61ms - +0.94ms
preact-local81.56ms - 82.62msunsure 🔍
-1% - +1%
-0.86ms - +0.74ms
-unsure 🔍
-1% - +1%
-0.63ms - +0.83ms
preact-hooks81.49ms - 82.49msunsure 🔍
-1% - +1%
-0.94ms - +0.61ms
unsure 🔍
-1% - +1%
-0.83ms - +0.63ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.32ms - 3.32ms-unsure 🔍
-0% - -0%
-0.01ms - -0.00ms
faster ✔
1% - 1%
0.03ms - 0.03ms
preact-local3.32ms - 3.33msunsure 🔍
+0% - +0%
+0.00ms - +0.01ms
-faster ✔
1% - 1%
0.02ms - 0.03ms
preact-hooks3.35ms - 3.35msslower ❌
1% - 1%
0.03ms - 0.03ms
slower ❌
1% - 1%
0.02ms - 0.03ms
-

run-warmup-0

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main31.61ms - 32.80ms-unsure 🔍
-3% - +2%
-1.00ms - +0.73ms
unsure 🔍
-5% - +1%
-1.54ms - +0.18ms
preact-local31.72ms - 32.97msunsure 🔍
-2% - +3%
-0.73ms - +1.00ms
-unsure 🔍
-4% - +1%
-1.43ms - +0.34ms
preact-hooks32.27ms - 33.51msunsure 🔍
-1% - +5%
-0.18ms - +1.54ms
unsure 🔍
-1% - +4%
-0.34ms - +1.43ms
-

run-warmup-1

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main38.22ms - 39.74ms-unsure 🔍
-2% - +4%
-0.62ms - +1.64ms
faster ✔
0% - 5%
0.00ms - 1.82ms
preact-local37.64ms - 39.31msunsure 🔍
-4% - +2%
-1.64ms - +0.62ms
-faster ✔
1% - 6%
0.45ms - 2.39ms
preact-hooks39.40ms - 40.38msunsure 🔍
-0% - +5%
+0.00ms - +1.82ms
slower ❌
1% - 6%
0.45ms - 2.39ms
-

run-warmup-2

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main29.19ms - 30.03ms-unsure 🔍
-1% - +2%
-0.31ms - +0.69ms
unsure 🔍
-3% - +1%
-0.97ms - +0.18ms
preact-local29.14ms - 29.69msunsure 🔍
-2% - +1%
-0.69ms - +0.31ms
-faster ✔
0% - 4%
0.11ms - 1.06ms
preact-hooks29.61ms - 30.39msunsure 🔍
-1% - +3%
-0.18ms - +0.97ms
slower ❌
0% - 4%
0.11ms - 1.06ms
-

run-warmup-3

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main22.53ms - 23.37ms-unsure 🔍
-1% - +3%
-0.15ms - +0.72ms
unsure 🔍
-2% - +2%
-0.51ms - +0.43ms
preact-local22.57ms - 22.77msunsure 🔍
-3% - +1%
-0.72ms - +0.15ms
-faster ✔
0% - 2%
0.09ms - 0.55ms
preact-hooks22.78ms - 23.20msunsure 🔍
-2% - +2%
-0.43ms - +0.51ms
slower ❌
0% - 2%
0.09ms - 0.55ms
-

run-warmup-4

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main37.59ms - 38.83ms-unsure 🔍
-3% - +1%
-1.31ms - +0.23ms
faster ✔
0% - 5%
0.14ms - 1.80ms
preact-local38.29ms - 39.20msunsure 🔍
-1% - +3%
-0.23ms - +1.31ms
-unsure 🔍
-3% - +1%
-1.15ms - +0.28ms
preact-hooks38.62ms - 39.73msslower ❌
0% - 5%
0.14ms - 1.80ms
unsure 🔍
-1% - +3%
-0.28ms - +1.15ms
-

run-final

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main22.43ms - 22.85ms-unsure 🔍
-3% - +0%
-0.58ms - +0.11ms
faster ✔
0% - 3%
0.10ms - 0.80ms
preact-local22.60ms - 23.14msunsure 🔍
-0% - +3%
-0.11ms - +0.58ms
-unsure 🔍
-3% - +1%
-0.61ms - +0.17ms
preact-hooks22.81ms - 23.37msslower ❌
0% - 4%
0.10ms - 0.80ms
unsure 🔍
-1% - +3%
-0.17ms - +0.61ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main30.28ms - 32.26ms-unsure 🔍
-5% - +4%
-1.49ms - +1.28ms
unsure 🔍
-5% - +4%
-1.41ms - +1.38ms
preact-local30.40ms - 32.35msunsure 🔍
-4% - +5%
-1.28ms - +1.49ms
-unsure 🔍
-4% - +5%
-1.30ms - +1.47ms
preact-hooks30.30ms - 32.27msunsure 🔍
-4% - +5%
-1.38ms - +1.41ms
unsure 🔍
-5% - +4%
-1.47ms - +1.30ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.28ms - 3.29ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.03ms
preact-local3.29ms - 3.30msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-faster ✔
0% - 1%
0.01ms - 0.03ms
preact-hooks3.31ms - 3.32msslower ❌
1% - 1%
0.02ms - 0.03ms
slower ❌
0% - 1%
0.01ms - 0.03ms
-
07_create10k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main934.93ms - 944.35ms-unsure 🔍
-0% - +1%
-4.10ms - +7.16ms
unsure 🔍
-1% - +1%
-5.54ms - +4.95ms
preact-local935.03ms - 941.19msunsure 🔍
-1% - +0%
-7.16ms - +4.10ms
-unsure 🔍
-1% - +0%
-5.68ms - +2.03ms
preact-hooks937.63ms - 942.25msunsure 🔍
-1% - +1%
-4.95ms - +5.54ms
unsure 🔍
-0% - +1%
-2.03ms - +5.68ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.32ms - 26.32ms-unsure 🔍
-0% - -0%
-0.01ms - -0.01ms
unsure 🔍
-0% - -0%
-0.03ms - -0.03ms
preact-local26.33ms - 26.33msunsure 🔍
+0% - +0%
+0.01ms - +0.01ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks26.35ms - 26.35msunsure 🔍
+0% - +0%
+0.03ms - +0.03ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
filter_list

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main16.62ms - 16.75ms-unsure 🔍
-1% - +0%
-0.18ms - +0.06ms
unsure 🔍
-0% - +1%
-0.07ms - +0.11ms
preact-local16.65ms - 16.85msunsure 🔍
-0% - +1%
-0.06ms - +0.18ms
-unsure 🔍
-0% - +1%
-0.03ms - +0.20ms
preact-hooks16.61ms - 16.72msunsure 🔍
-1% - +0%
-0.11ms - +0.07ms
unsure 🔍
-1% - +0%
-0.20ms - +0.03ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main1.33ms - 1.33ms-faster ✔
0% - 1%
0.01ms - 0.01ms
faster ✔
2% - 3%
0.03ms - 0.03ms
preact-local1.34ms - 1.34msslower ❌
0% - 1%
0.01ms - 0.01ms
-faster ✔
2% - 2%
0.02ms - 0.03ms
preact-hooks1.36ms - 1.37msslower ❌
2% - 3%
0.03ms - 0.03ms
slower ❌
2% - 2%
0.02ms - 0.03ms
-
hydrate1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main86.97ms - 88.62ms-unsure 🔍
-3% - +2%
-2.69ms - +1.62ms
unsure 🔍
-1% - +1%
-0.68ms - +1.11ms
preact-local86.34ms - 90.33msunsure 🔍
-2% - +3%
-1.62ms - +2.69ms
-unsure 🔍
-1% - +3%
-1.27ms - +2.77ms
preact-hooks87.23ms - 87.94msunsure 🔍
-1% - +1%
-1.11ms - +0.68ms
unsure 🔍
-3% - +1%
-2.77ms - +1.27ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main6.10ms - 6.10ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.03ms - -0.03ms
preact-local6.10ms - 6.10msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.03ms - -0.02ms
preact-hooks6.13ms - 6.13msunsure 🔍
+0% - +0%
+0.03ms - +0.03ms
unsure 🔍
+0% - +0%
+0.02ms - +0.03ms
-
many_updates

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main16.96ms - 17.35ms-faster ✔
0% - 5%
0.05ms - 0.84ms
unsure 🔍
-3% - +1%
-0.59ms - +0.16ms
preact-local17.26ms - 17.94msslower ❌
0% - 5%
0.05ms - 0.84ms
-unsure 🔍
-1% - +4%
-0.24ms - +0.69ms
preact-hooks17.05ms - 17.69msunsure 🔍
-1% - +3%
-0.16ms - +0.59ms
unsure 🔍
-4% - +1%
-0.69ms - +0.24ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main4.44ms - 4.45ms-unsure 🔍
-0% - -0%
-0.01ms - -0.00ms
faster ✔
1% - 1%
0.03ms - 0.03ms
preact-local4.45ms - 4.45msunsure 🔍
+0% - +0%
+0.00ms - +0.01ms
-faster ✔
0% - 1%
0.02ms - 0.02ms
preact-hooks4.47ms - 4.47msslower ❌
1% - 1%
0.03ms - 0.03ms
slower ❌
0% - 1%
0.02ms - 0.02ms
-
text_update

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main2.51ms - 2.59ms-faster ✔
3% - 7%
0.07ms - 0.18ms
faster ✔
11% - 14%
0.31ms - 0.42ms
preact-local2.63ms - 2.71msslower ❌
3% - 7%
0.07ms - 0.18ms
-faster ✔
6% - 10%
0.19ms - 0.30ms
preact-hooks2.88ms - 2.96msslower ❌
12% - 17%
0.31ms - 0.42ms
slower ❌
7% - 11%
0.19ms - 0.30ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.57ms - 0.58ms-faster ✔
1% - 4%
0.01ms - 0.03ms
faster ✔
1% - 3%
0.01ms - 0.02ms
preact-local0.59ms - 0.60msslower ❌
1% - 4%
0.01ms - 0.03ms
-unsure 🔍
-1% - +2%
-0.00ms - +0.01ms
preact-hooks0.59ms - 0.59msslower ❌
1% - 3%
0.01ms - 0.02ms
unsure 🔍
-2% - +1%
-0.01ms - +0.00ms
-
todo

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main27.00ms - 27.23ms-unsure 🔍
-0% - +1%
-0.10ms - +0.21ms
faster ✔
2% - 4%
0.51ms - 1.09ms
preact-local26.96ms - 27.16msunsure 🔍
-1% - +0%
-0.21ms - +0.10ms
-faster ✔
2% - 4%
0.57ms - 1.14ms
preact-hooks27.65ms - 28.18msslower ❌
2% - 4%
0.51ms - 1.09ms
slower ❌
2% - 4%
0.57ms - 1.14ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.79ms - 0.79ms-faster ✔
1% - 1%
0.01ms - 0.01ms
faster ✔
4% - 4%
0.03ms - 0.03ms
preact-local0.80ms - 0.80msslower ❌
1% - 1%
0.01ms - 0.01ms
-faster ✔
3% - 3%
0.03ms - 0.03ms
preact-hooks0.83ms - 0.83msslower ❌
4% - 4%
0.03ms - 0.03ms
slower ❌
3% - 3%
0.03ms - 0.03ms
-

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Dec 29, 2023

Coverage Status

coverage: 99.487% (-0.001%) from 99.488%
when pulling 90f53a3 on add-back-focus
into 76d6d4d on main.

Copy link

github-actions bot commented Dec 29, 2023

Size Change: +323 B (+0.52%)

Total Size: 62.5 kB

Filename Size Change
dist/preact.js 4.74 kB +55 B (+1.18%)
dist/preact.min.js 4.76 kB +52 B (+1.1%)
dist/preact.min.module.js 4.76 kB +55 B (+1.17%)
dist/preact.min.umd.js 4.79 kB +50 B (+1.06%)
dist/preact.module.js 4.75 kB +57 B (+1.21%)
dist/preact.umd.js 4.8 kB +54 B (+1.14%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.13 kB
compat/dist/compat.module.js 4.05 kB
compat/dist/compat.umd.js 4.19 kB
debug/dist/debug.js 3.82 kB
debug/dist/debug.module.js 3.83 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.53 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 976 B
jsx-runtime/dist/jsxRuntime.module.js 949 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@developit
Copy link
Member

perf impact here is not worthwhile IMO, since it impacts performance on every diff regardless of whether focus needed to be restored.

I'd love to come up with a way to have the diff avoid losing focus in this case, but the problem I see is that it would always be specific to focus state. It would never fix things like <video> playback stopping or <iframe> being reloaded. The problem is that it's impossible to determine whether one DOM element is "more stateful" than any other DOM element.

Here's a particularly fun case where, no matter what we do, at least one of the iframes will be reloaded:

function Swapper() {
  const [swapped, swap] = useReducer(s => !s, false);
  
  const a = <iframe key="a" src="/a.html" />;
  const b = <iframe key="b" src="/b.html" />;

  return <>
    <button onClick={swap}>Swap</button>
    {swapped ? [b, a] : [a, b]}
  </>;
}

@JoviDeCroock JoviDeCroock deleted the add-back-focus branch January 5, 2024 17:39
@JoviDeCroock JoviDeCroock restored the add-back-focus branch November 10, 2024 17:51
@JoviDeCroock JoviDeCroock reopened this Nov 10, 2024
Copy link

github-actions bot commented Nov 10, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +1% (-3.96ms - +6.02ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +3% (-0.12ms - +0.48ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -3% - +2% (-2.00ms - +1.74ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +1% (-0.33ms - +0.18ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -2% - +3% (-1.38ms - +1.86ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -0% - +8% (-0.01ms - +0.17ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +2% (-0.20ms - +0.76ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -4% - +1% (-1.50ms - +0.41ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.02ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +2% (-0.00ms - +0.03ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +4% (-0.30ms - +0.59ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +1% (-0.00ms - +0.03ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.02ms - +0.03ms)
    preact-local vs preact-main
  • text-update: slower ❌ 0% - 1% (0.00ms - 0.01ms)
    preact-local vs preact-main
  • todo: slower ❌ 0% - 2% (0.01ms - 0.03ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local895.30ms - 900.98ms-unsure 🔍
-0% - +1%
-3.96ms - +6.02ms
preact-main893.00ms - 901.21msunsure 🔍
-1% - +0%
-6.02ms - +3.96ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local25.28ms - 25.30ms-unsure 🔍
-0% - +0%
-0.00ms - +0.02ms
preact-main25.28ms - 25.29msunsure 🔍
-0% - +0%
-0.02ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.47ms - 17.07ms-unsure 🔍
-1% - +3%
-0.12ms - +0.48ms
preact-main16.55ms - 16.63msunsure 🔍
-3% - +1%
-0.48ms - +0.12ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.67ms - 1.70ms-unsure 🔍
-0% - +2%
-0.00ms - +0.03ms
preact-main1.66ms - 1.68msunsure 🔍
-2% - +0%
-0.03ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local75.68ms - 79.12ms-unsure 🔍
-3% - +2%
-2.00ms - +1.74ms
preact-main76.80ms - 78.27msunsure 🔍
-2% - +3%
-1.74ms - +2.00ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local13.09ms - 13.60ms-unsure 🔍
-2% - +4%
-0.30ms - +0.59ms
preact-main12.84ms - 13.56msunsure 🔍
-4% - +2%
-0.59ms - +0.30ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.39ms - 16.71ms-unsure 🔍
-2% - +1%
-0.33ms - +0.18ms
preact-main16.42ms - 16.82msunsure 🔍
-1% - +2%
-0.18ms - +0.33ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.59ms - 4.61ms-unsure 🔍
-0% - +1%
-0.00ms - +0.03ms
preact-main4.57ms - 4.60msunsure 🔍
-1% - +0%
-0.03ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4026
  • Commit: 7175b05

duration

VersionAvg timevs preact-localvs preact-main
preact-local72.16ms - 74.66ms-unsure 🔍
-2% - +3%
-1.38ms - +1.86ms
preact-main72.14ms - 74.20msunsure 🔍
-3% - +2%
-1.86ms - +1.38ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.57ms - 3.61ms-unsure 🔍
-1% - +1%
-0.02ms - +0.03ms
preact-main3.57ms - 3.61msunsure 🔍
-1% - +1%
-0.03ms - +0.02ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local29.73ms - 30.35ms-faster ✔
0% - 3%
0.04ms - 0.94ms
preact-main30.20ms - 30.85msslower ❌
0% - 3%
0.04ms - 0.94ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local34.03ms - 35.32ms-unsure 🔍
-4% - +2%
-1.24ms - +0.69ms
preact-main34.23ms - 35.66msunsure 🔍
-2% - +4%
-0.69ms - +1.24ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local24.80ms - 25.46ms-unsure 🔍
-1% - +2%
-0.17ms - +0.57ms
preact-main24.78ms - 25.09msunsure 🔍
-2% - +1%
-0.57ms - +0.17ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local26.83ms - 28.36ms-unsure 🔍
-5% - +3%
-1.46ms - +0.73ms
preact-main27.18ms - 28.74msunsure 🔍
-3% - +5%
-0.73ms - +1.46ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local19.75ms - 20.17ms-unsure 🔍
-2% - +1%
-0.33ms - +0.28ms
preact-main19.76ms - 20.21msunsure 🔍
-1% - +2%
-0.28ms - +0.33ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local22.01ms - 22.87ms-unsure 🔍
-1% - +3%
-0.33ms - +0.66ms
preact-main22.02ms - 22.53msunsure 🔍
-3% - +1%
-0.66ms - +0.33ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 230
  • Built by: CI #4026
  • Commit: 7175b05

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.15ms - 2.27ms-unsure 🔍
-0% - +8%
-0.01ms - +0.17ms
preact-main2.07ms - 2.19msunsure 🔍
-7% - +0%
-0.17ms - +0.01ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.11ms - 1.12ms-slower ❌
0% - 1%
0.00ms - 0.01ms
preact-main1.11ms - 1.11msfaster ✔
0% - 1%
0.00ms - 0.01ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.30ms - 34.23ms-unsure 🔍
-1% - +2%
-0.20ms - +0.76ms
preact-main33.36ms - 33.60msunsure 🔍
-2% - +1%
-0.76ms - +0.20ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.23ms - 1.25ms-slower ❌
0% - 2%
0.01ms - 0.03ms
preact-main1.22ms - 1.22msfaster ✔
0% - 2%
0.01ms - 0.03ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.00ms - 34.16ms-unsure 🔍
-4% - +1%
-1.50ms - +0.41ms
preact-main33.37ms - 34.88msunsure 🔍
-1% - +4%
-0.41ms - +1.50ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.53ms - 3.55ms-unsure 🔍
-0% - +1%
-0.01ms - +0.02ms
preact-main3.52ms - 3.54msunsure 🔍
-1% - +0%
-0.02ms - +0.01ms
-

tachometer-reporter-action v2 for CI

@JoviDeCroock
Copy link
Member Author

JoviDeCroock commented Nov 10, 2024

This could be perf neutral but there are a lot of considerations like in-render blurring as well as cross-frame focus 😅 just wanted to check the perf and size after these changes

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.

Focus lost when moving child with key Focus is lost during list re-order
3 participants