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

fix: Don't rename gotpointercapture and lostpointercapture events #4096

Merged
merged 4 commits into from
Aug 15, 2023

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented Aug 14, 2023

Fixes part of #4095

onGotPointerCapture and onLostPointerCapture have their names incorrectly altered to GotPointer and LostPointer respectively with the current state of things. They'll need to be skipped over in some fashion.

I'm a code golf scrub, might be (probably is) a better way to correct these.

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: slower ❌ 0% - 3% (0.48ms - 4.54ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -3% - +4% (-1.23ms - +1.74ms)
    preact-local vs preact-main
  • 07_create10k: unsure 🔍 -0% - +1% (-2.55ms - +9.04ms)
    preact-local vs preact-main
  • filter_list: unsure 🔍 -3% - +4% (-0.81ms - +1.17ms)
    preact-local vs preact-main
  • hydrate1k: faster ✔ 0% - 4% (0.04ms - 6.08ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -1% - +4% (-0.34ms - +0.94ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -1% - +5% (-0.04ms - +0.17ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +3% (-0.59ms - +1.50ms)
    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.00ms - +0.00ms)
    preact-local vs preact-main
  • filter_list: unsure 🔍 -2% - +2% (-0.03ms - +0.03ms)
    preact-local vs preact-main
  • hydrate1k: faster ✔ 1% - 1% (0.03ms - 0.09ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -0% - +0% (-0.02ms - +0.02ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main

Results

02_replace1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main143.37ms - 145.65ms-faster ✔
0% - 3%
0.48ms - 4.54ms
unsure 🔍
-2% - +1%
-2.94ms - +1.21ms
preact-local145.34ms - 148.71msslower ❌
0% - 3%
0.48ms - 4.54ms
-unsure 🔍
-1% - +3%
-0.77ms - +4.06ms
preact-hooks143.64ms - 147.11msunsure 🔍
-1% - +2%
-1.21ms - +2.94ms
unsure 🔍
-3% - +1%
-4.06ms - +0.77ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.27ms - 3.28ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.03ms
preact-local3.28ms - 3.29msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-faster ✔
0% - 1%
0.01ms - 0.03ms
preact-hooks3.30ms - 3.31msslower ❌
1% - 1%
0.02ms - 0.03ms
slower ❌
0% - 1%
0.01ms - 0.03ms
-

run-warmup-0

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main45.52ms - 47.23ms-unsure 🔍
-1% - +4%
-0.68ms - +1.71ms
faster ✔
2% - 7%
1.14ms - 3.59ms
preact-local45.03ms - 46.69msunsure 🔍
-4% - +1%
-1.71ms - +0.68ms
-faster ✔
4% - 8%
1.67ms - 4.09ms
preact-hooks47.86ms - 49.61msslower ❌
2% - 8%
1.14ms - 3.59ms
slower ❌
4% - 9%
1.67ms - 4.09ms
-

run-warmup-1

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main63.17ms - 65.42ms-unsure 🔍
-0% - +5%
-0.11ms - +3.34ms
unsure 🔍
-2% - +4%
-0.96ms - +2.27ms
preact-local61.37ms - 63.99msunsure 🔍
-5% - +0%
-3.34ms - +0.11ms
-unsure 🔍
-4% - +1%
-2.71ms - +0.79ms
preact-hooks62.47ms - 64.80msunsure 🔍
-4% - +1%
-2.27ms - +0.96ms
unsure 🔍
-1% - +4%
-0.79ms - +2.71ms
-

run-warmup-2

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main47.16ms - 50.22ms-unsure 🔍
-2% - +5%
-1.15ms - +2.33ms
slower ❌
1% - 8%
0.53ms - 3.85ms
preact-local47.27ms - 48.92msunsure 🔍
-5% - +2%
-2.33ms - +1.15ms
-slower ❌
1% - 6%
0.55ms - 2.64ms
preact-hooks45.86ms - 47.14msfaster ✔
1% - 8%
0.53ms - 3.85ms
faster ✔
1% - 5%
0.55ms - 2.64ms
-

run-warmup-3

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main49.12ms - 51.68ms-faster ✔
4% - 10%
2.00ms - 5.56ms
faster ✔
7% - 13%
4.03ms - 7.58ms
preact-local52.94ms - 55.42msslower ❌
4% - 11%
2.00ms - 5.56ms
-faster ✔
1% - 7%
0.28ms - 3.77ms
preact-hooks54.97ms - 57.44msslower ❌
8% - 15%
4.03ms - 7.58ms
slower ❌
0% - 7%
0.28ms - 3.77ms
-

run-warmup-4

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main53.17ms - 55.86ms-unsure 🔍
-2% - +5%
-0.95ms - +2.75ms
unsure 🔍
-5% - +3%
-2.71ms - +1.45ms
preact-local52.35ms - 54.88msunsure 🔍
-5% - +2%
-2.75ms - +0.95ms
-unsure 🔍
-6% - +1%
-3.57ms - +0.49ms
preact-hooks53.56ms - 56.74msunsure 🔍
-3% - +5%
-1.45ms - +2.71ms
unsure 🔍
-1% - +7%
-0.49ms - +3.57ms
-

run-final

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main35.83ms - 37.65ms-faster ✔
3% - 10%
1.31ms - 4.09ms
faster ✔
2% - 9%
0.83ms - 3.67ms
preact-local38.40ms - 40.50msslower ❌
3% - 11%
1.31ms - 4.09ms
-unsure 🔍
-3% - +5%
-1.06ms - +1.96ms
preact-hooks37.91ms - 40.09msslower ❌
2% - 10%
0.83ms - 3.67ms
unsure 🔍
-5% - +3%
-1.96ms - +1.06ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main46.35ms - 48.16ms-unsure 🔍
-4% - +3%
-1.74ms - +1.23ms
unsure 🔍
-3% - +4%
-1.21ms - +1.69ms
preact-local46.33ms - 48.68msunsure 🔍
-3% - +4%
-1.23ms - +1.74ms
-unsure 🔍
-2% - +5%
-1.14ms - +2.13ms
preact-hooks45.88ms - 48.15msunsure 🔍
-4% - +3%
-1.69ms - +1.21ms
unsure 🔍
-4% - +2%
-2.13ms - +1.14ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.23ms - 3.24ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.04ms
preact-local3.23ms - 3.24msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-faster ✔
0% - 1%
0.02ms - 0.03ms
preact-hooks3.26ms - 3.27msslower ❌
1% - 1%
0.02ms - 0.04ms
slower ❌
0% - 1%
0.02ms - 0.03ms
-
07_create10k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main1139.99ms - 1146.77ms-unsure 🔍
-1% - +0%
-9.04ms - +2.55ms
unsure 🔍
-1% - +0%
-8.09ms - +1.50ms
preact-local1141.92ms - 1151.33msunsure 🔍
-0% - +1%
-2.55ms - +9.04ms
-unsure 🔍
-1% - +1%
-5.84ms - +5.74ms
preact-hooks1143.29ms - 1150.06msunsure 🔍
-0% - +1%
-1.50ms - +8.09ms
unsure 🔍
-1% - +1%
-5.74ms - +5.84ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main25.32ms - 25.32ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local25.32ms - 25.32msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks25.34ms - 25.34msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
filter_list

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main29.72ms - 30.97ms-unsure 🔍
-4% - +3%
-1.17ms - +0.81ms
unsure 🔍
-5% - +1%
-1.51ms - +0.38ms
preact-local29.75ms - 31.29msunsure 🔍
-3% - +4%
-0.81ms - +1.17ms
-unsure 🔍
-5% - +2%
-1.44ms - +0.66ms
preact-hooks30.20ms - 31.62msunsure 🔍
-1% - +5%
-0.38ms - +1.51ms
unsure 🔍
-2% - +5%
-0.66ms - +1.44ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main1.44ms - 1.48ms-unsure 🔍
-2% - +2%
-0.03ms - +0.03ms
unsure 🔍
-2% - +2%
-0.02ms - +0.03ms
preact-local1.44ms - 1.48msunsure 🔍
-2% - +2%
-0.03ms - +0.03ms
-unsure 🔍
-1% - +2%
-0.02ms - +0.04ms
preact-hooks1.44ms - 1.47msunsure 🔍
-2% - +2%
-0.03ms - +0.02ms
unsure 🔍
-2% - +1%
-0.04ms - +0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main141.70ms - 146.03ms-slower ❌
0% - 4%
0.04ms - 6.08ms
unsure 🔍
-1% - +3%
-1.23ms - +4.93ms
preact-local138.69ms - 142.91msfaster ✔
0% - 4%
0.04ms - 6.08ms
-unsure 🔍
-3% - +1%
-4.25ms - +1.83ms
preact-hooks139.82ms - 144.20msunsure 🔍
-3% - +1%
-4.93ms - +1.23ms
unsure 🔍
-1% - +3%
-1.83ms - +4.25ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main5.94ms - 5.97ms-slower ❌
1% - 1%
0.03ms - 0.09ms
slower ❌
0% - 1%
0.01ms - 0.07ms
preact-local5.87ms - 5.92msfaster ✔
1% - 1%
0.03ms - 0.09ms
-unsure 🔍
-1% - +0%
-0.05ms - +0.01ms
preact-hooks5.90ms - 5.93msfaster ✔
0% - 1%
0.01ms - 0.07ms
unsure 🔍
-0% - +1%
-0.01ms - +0.05ms
-
many_updates

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.58ms - 27.40ms-unsure 🔍
-3% - +1%
-0.94ms - +0.34ms
unsure 🔍
-4% - +0%
-1.15ms - +0.05ms
preact-local26.80ms - 27.79msunsure 🔍
-1% - +4%
-0.34ms - +0.94ms
-unsure 🔍
-3% - +1%
-0.90ms - +0.41ms
preact-hooks27.11ms - 27.97msunsure 🔍
-0% - +4%
-0.05ms - +1.15ms
unsure 🔍
-2% - +3%
-0.41ms - +0.90ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main4.48ms - 4.50ms-unsure 🔍
-0% - +0%
-0.02ms - +0.02ms
unsure 🔍
-1% - +0%
-0.03ms - +0.01ms
preact-local4.48ms - 4.51msunsure 🔍
-0% - +0%
-0.02ms - +0.02ms
-unsure 🔍
-1% - +0%
-0.03ms - +0.01ms
preact-hooks4.49ms - 4.52msunsure 🔍
-0% - +1%
-0.01ms - +0.03ms
unsure 🔍
-0% - +1%
-0.01ms - +0.03ms
-
text_update

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.31ms - 3.45ms-unsure 🔍
-5% - +1%
-0.17ms - +0.04ms
faster ✔
3% - 8%
0.12ms - 0.31ms
preact-local3.36ms - 3.52msunsure 🔍
-1% - +5%
-0.04ms - +0.17ms
-faster ✔
1% - 7%
0.05ms - 0.25ms
preact-hooks3.53ms - 3.65msslower ❌
3% - 9%
0.12ms - 0.31ms
slower ❌
1% - 7%
0.05ms - 0.25ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.62ms - 0.62ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
8% - 11%
0.06ms - 0.07ms
preact-local0.62ms - 0.62msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
9% - 11%
0.06ms - 0.07ms
preact-hooks0.68ms - 0.69msslower ❌
9% - 12%
0.06ms - 0.07ms
slower ❌
9% - 12%
0.06ms - 0.07ms
-
todo

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main51.46ms - 52.99ms-unsure 🔍
-3% - +1%
-1.50ms - +0.59ms
faster ✔
2% - 6%
1.11ms - 3.28ms
preact-local51.98ms - 53.39msunsure 🔍
-1% - +3%
-0.59ms - +1.50ms
-faster ✔
1% - 5%
0.70ms - 2.78ms
preact-hooks53.66ms - 55.18msslower ❌
2% - 6%
1.11ms - 3.28ms
slower ❌
1% - 5%
0.70ms - 2.78ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.82ms - 0.82ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
faster ✔
3% - 3%
0.02ms - 0.02ms
preact-local0.82ms - 0.82msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-faster ✔
2% - 2%
0.02ms - 0.02ms
preact-hooks0.84ms - 0.84msslower ❌
3% - 3%
0.02ms - 0.02ms
slower ❌
2% - 3%
0.02ms - 0.02ms
-

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Aug 14, 2023

Coverage Status

coverage: 99.563%. remained the same when pulling c1ca65b on fix/pointer-capture-event-listeners into 19b3b1b on main.

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

Size Change: +60 B (0%)

Total Size: 57.2 kB

Filename Size Change
dist/preact.js 4.36 kB +5 B (0%)
dist/preact.min.js 4.39 kB +11 B (0%)
dist/preact.min.module.js 4.39 kB +11 B (0%)
dist/preact.min.umd.js 4.42 kB +11 B (0%)
dist/preact.module.js 4.39 kB +11 B (0%)
dist/preact.umd.js 4.43 kB +11 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.95 kB 0 B
compat/dist/compat.module.js 3.87 kB 0 B
compat/dist/compat.umd.js 4.01 kB 0 B
debug/dist/debug.js 3.64 kB 0 B
debug/dist/debug.module.js 3.62 kB 0 B
debug/dist/debug.umd.js 3.71 kB 0 B
devtools/dist/devtools.js 232 B 0 B
devtools/dist/devtools.module.js 240 B 0 B
devtools/dist/devtools.umd.js 315 B 0 B
hooks/dist/hooks.js 1.53 kB 0 B
hooks/dist/hooks.module.js 1.56 kB 0 B
hooks/dist/hooks.umd.js 1.62 kB 0 B
jsx-runtime/dist/jsxRuntime.js 360 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 326 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 441 B 0 B
test-utils/dist/testUtils.js 453 B 0 B
test-utils/dist/testUtils.module.js 454 B 0 B
test-utils/dist/testUtils.umd.js 536 B 0 B

compressed-size-action

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small code golf nit. Let's add a test if possible and then it's good to go 👍

@rschristian rschristian marked this pull request as draft August 14, 2023 23:35
@rschristian rschristian force-pushed the fix/pointer-capture-event-listeners branch from 99cf253 to c1ca65b Compare August 15, 2023 00:58
@rschristian rschristian marked this pull request as ready for review August 15, 2023 00:58
@rschristian rschristian merged commit 7cd4833 into main Aug 15, 2023
12 checks passed
@rschristian rschristian deleted the fix/pointer-capture-event-listeners branch August 15, 2023 14:57
@developit
Copy link
Member

Code golf suggestion:

useCapture = name !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));

developit added a commit that referenced this pull request Aug 16, 2023
JoviDeCroock pushed a commit that referenced this pull request Aug 18, 2023
* golf size/perf of #4096

* golf

* golf 2
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 19, 2023
@JoviDeCroock JoviDeCroock mentioned this pull request Apr 27, 2024
13 tasks
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.

5 participants