Skip to content

Conversation

@JoviDeCroock
Copy link
Member

We reduce the raf timeout to be just above a timeout that is associated with a 30hz refresh rate. This ensures that for hidden frames the timeout drift can't be too large, the drift being too high could lead to unexpected situations.

@github-actions
Copy link

github-actions bot commented Apr 27, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +0% (-2.10ms - +3.30ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.02ms - +0.04ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +1% (-1.01ms - +0.90ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +1% (-0.18ms - +0.10ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.65ms - +0.81ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +5% (-0.07ms - +0.10ms)
    preact-local vs preact-main
  • todo: slower ❌ 0% - 1% (0.02ms - 0.33ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -4% - +3% (-1.21ms - +1.03ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -8% - +1% (-0.59ms - +0.07ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -3% - +1% (-0.03ms - +0.01ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +1% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local989.20ms - 992.94ms-unsure 🔍
-0% - +0%
-2.10ms - +3.30ms
preact-main988.52ms - 992.42msunsure 🔍
-0% - +0%
-3.30ms - +2.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.18ms - 19.18ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main19.18ms - 19.18msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.55ms - 16.59ms-unsure 🔍
-0% - +0%
-0.02ms - +0.04ms
preact-main16.54ms - 16.58msunsure 🔍
-0% - +0%
-0.04ms - +0.02ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.54ms - 1.54ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.54ms - 1.54msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.31ms - 69.64ms-unsure 🔍
-1% - +1%
-1.01ms - +0.90ms
preact-main68.34ms - 69.72msunsure 🔍
-1% - +1%
-0.90ms - +1.01ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local6.98ms - 7.47ms-unsure 🔍
-8% - +1%
-0.59ms - +0.07ms
preact-main7.26ms - 7.71msunsure 🔍
-1% - +8%
-0.07ms - +0.59ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.31ms - 16.55ms-unsure 🔍
-1% - +1%
-0.18ms - +0.10ms
preact-main16.39ms - 16.54msunsure 🔍
-1% - +1%
-0.10ms - +0.18ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.77ms - 3.77ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main3.77ms - 3.77msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4700
  • Commit: a2e7ec9

duration

VersionAvg timevs preact-localvs preact-main
preact-local61.98ms - 63.03ms-unsure 🔍
-1% - +1%
-0.65ms - +0.81ms
preact-main61.92ms - 62.93msunsure 🔍
-1% - +1%
-0.81ms - +0.65ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.98ms - 2.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main2.98ms - 2.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local25.75ms - 26.40ms-unsure 🔍
-1% - +2%
-0.36ms - +0.53ms
preact-main25.68ms - 26.30msunsure 🔍
-2% - +1%
-0.53ms - +0.36ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local33.38ms - 34.66ms-unsure 🔍
-3% - +2%
-1.05ms - +0.78ms
preact-main33.51ms - 34.80msunsure 🔍
-2% - +3%
-0.78ms - +1.05ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local27.95ms - 28.83ms-unsure 🔍
-4% - +1%
-1.11ms - +0.18ms
preact-main28.39ms - 29.33msunsure 🔍
-1% - +4%
-0.18ms - +1.11ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local26.70ms - 27.65ms-unsure 🔍
-3% - +2%
-0.72ms - +0.65ms
preact-main26.71ms - 27.70msunsure 🔍
-2% - +3%
-0.65ms - +0.72ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local23.09ms - 24.18ms-unsure 🔍
-4% - +2%
-1.06ms - +0.43ms
preact-main23.43ms - 24.46msunsure 🔍
-2% - +5%
-0.43ms - +1.06ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.96ms - 21.69ms-unsure 🔍
-2% - +3%
-0.50ms - +0.58ms
preact-main20.88ms - 21.68msunsure 🔍
-3% - +2%
-0.58ms - +0.50ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 210
  • Built by: CI #4700
  • Commit: a2e7ec9

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.01ms - 2.12ms-unsure 🔍
-4% - +5%
-0.07ms - +0.10ms
preact-main1.99ms - 2.12msunsure 🔍
-5% - +3%
-0.10ms - +0.07ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.14ms - 1.16ms-unsure 🔍
-3% - +1%
-0.03ms - +0.01ms
preact-main1.15ms - 1.18msunsure 🔍
-1% - +3%
-0.01ms - +0.03ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.48ms - 33.70ms-slower ❌
0% - 1%
0.02ms - 0.33ms
preact-main33.30ms - 33.53msfaster ✔
0% - 1%
0.02ms - 0.33ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.24ms - 1.25ms-unsure 🔍
-0% - +1%
-0.00ms - +0.01ms
preact-main1.24ms - 1.24msunsure 🔍
-1% - +0%
-0.01ms - +0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.76ms - 31.39ms-unsure 🔍
-4% - +3%
-1.21ms - +1.03ms
preact-main29.90ms - 31.43msunsure 🔍
-3% - +4%
-1.03ms - +1.21ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.95ms - 2.96ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main2.94ms - 2.95msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-

tachometer-reporter-action v2 for CI

@github-actions
Copy link

github-actions bot commented Apr 27, 2025

Size Change: +3 B (0%)

Total Size: 78.6 kB

Filename Size Change
hooks/dist/hooks.js 1.54 kB +1 B (+0.07%)
hooks/dist/hooks.umd.js 1.61 kB +2 B (+0.12%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.15 kB
compat/dist/compat.mjs 4.08 kB
compat/dist/compat.module.js 4.08 kB
compat/dist/compat.umd.js 4.21 kB
debug/dist/debug.js 3.82 kB
debug/dist/debug.mjs 3.82 kB
debug/dist/debug.module.js 3.82 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 274 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.75 kB
dist/preact.min.js 4.77 kB
dist/preact.min.module.js 4.77 kB
dist/preact.min.umd.js 4.8 kB
dist/preact.mjs 4.76 kB
dist/preact.module.js 4.76 kB
dist/preact.umd.js 4.8 kB
hooks/dist/hooks.mjs 1.57 kB
hooks/dist/hooks.module.js 1.57 kB
jsx-runtime/dist/jsxRuntime.js 978 B
jsx-runtime/dist/jsxRuntime.mjs 952 B
jsx-runtime/dist/jsxRuntime.module.js 952 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 477 B
test-utils/dist/testUtils.module.js 477 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@coveralls
Copy link

Coverage Status

coverage: 99.61%. remained the same
when pulling c8aac02 on reduce-raf-timeout-35ms
into bb804cd on main.

@JoviDeCroock JoviDeCroock requested a review from developit April 30, 2025 14:06
JoviDeCroock added a commit to preactjs/signals that referenced this pull request May 17, 2025
@JoviDeCroock JoviDeCroock merged commit a2032a3 into main May 17, 2025
12 checks passed
@JoviDeCroock JoviDeCroock deleted the reduce-raf-timeout-35ms branch May 17, 2025 06:15
@JoviDeCroock JoviDeCroock mentioned this pull request May 24, 2025
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.

4 participants