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

support falsy data attributes #3720

Merged
merged 2 commits into from Sep 13, 2022
Merged

support falsy data attributes #3720

merged 2 commits into from Sep 13, 2022

Conversation

JoviDeCroock
Copy link
Member

Fixes #3717

This moves us from aria- special casing to checking for a dash so we cover both data- and aria-

@github-actions
Copy link

github-actions bot commented Sep 12, 2022

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -12% - +3% (-12.85ms - +3.94ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -4% - +2% (-2.25ms - +1.16ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +1% (-6.25ms - +19.29ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -2% - +2% (-0.42ms - +0.40ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -1% - +1% (-1.24ms - +0.97ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -5% - +3% (-1.68ms - +0.90ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -4% - +5% (-0.15ms - +0.18ms)
    preact-local vs preact-master
  • todo: unsure 🔍 -1% - +0% (-0.42ms - +0.22ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -3% - +10% (-0.11ms - +0.38ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +1% (-0.00ms - +0.03ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -1% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -4% - +1% (-0.29ms - +0.07ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -0% - -0% (-0.00ms - -0.00ms)
    preact-local vs preact-master
  • todo: unsure 🔍 -1% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-master

Results

02_replace1k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master103.92ms - 114.17ms-unsure 🔍
-4% - +12%
-3.94ms - +12.85ms
unsure 🔍
-8% - +2%
-9.30ms - +2.33ms
preact-local97.94ms - 111.23msunsure 🔍
-12% - +3%
-12.85ms - +3.94ms
-faster ✔
1% - 13%
0.75ms - 15.13ms
preact-hooks109.79ms - 115.27msunsure 🔍
-2% - +9%
-2.33ms - +9.30ms
slower ❌
0% - 15%
0.75ms - 15.13ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.74ms - 4.04ms-unsure 🔍
-9% - +3%
-0.38ms - +0.11ms
faster ✔
2% - 10%
0.09ms - 0.43ms
preact-local3.83ms - 4.22msunsure 🔍
-3% - +10%
-0.11ms - +0.38ms
-unsure 🔍
-8% - +2%
-0.33ms - +0.08ms
preact-hooks4.07ms - 4.23msslower ❌
2% - 11%
0.09ms - 0.43ms
unsure 🔍
-2% - +8%
-0.08ms - +0.33ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.97ms - 1.03ms-unsure 🔍
-2% - +5%
-0.02ms - +0.05ms
unsure 🔍
-2% - +4%
-0.02ms - +0.04ms
preact-local0.97ms - 1.01msunsure 🔍
-5% - +2%
-0.05ms - +0.02ms
-unsure 🔍
-4% - +2%
-0.04ms - +0.02ms
preact-hooks0.97ms - 1.01msunsure 🔍
-4% - +2%
-0.04ms - +0.02ms
unsure 🔍
-2% - +4%
-0.02ms - +0.04ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.59ms - 0.73ms-unsure 🔍
-8% - +20%
-0.05ms - +0.12ms
slower ❌
8% - 45%
0.05ms - 0.23ms
preact-local0.58ms - 0.66msunsure 🔍
-18% - +6%
-0.12ms - +0.05ms
-slower ❌
5% - 34%
0.03ms - 0.17ms
preact-hooks0.47ms - 0.57msfaster ✔
10% - 33%
0.05ms - 0.23ms
faster ✔
6% - 27%
0.03ms - 0.17ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.65ms - 0.87ms-unsure 🔍
-12% - +27%
-0.08ms - +0.19ms
slower ❌
17% - 64%
0.10ms - 0.34ms
preact-local0.63ms - 0.78msunsure 🔍
-24% - +10%
-0.19ms - +0.08ms
-slower ❌
13% - 49%
0.08ms - 0.26ms
preact-hooks0.49ms - 0.58msfaster ✔
17% - 41%
0.10ms - 0.34ms
faster ✔
13% - 34%
0.08ms - 0.26ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.32ms - 0.39ms-unsure 🔍
-18% - +9%
-0.07ms - +0.04ms
faster ✔
6% - 26%
0.02ms - 0.11ms
preact-local0.33ms - 0.41msunsure 🔍
-11% - +19%
-0.04ms - +0.07ms
-faster ✔
1% - 23%
0.00ms - 0.10ms
preact-hooks0.40ms - 0.45msslower ❌
5% - 33%
0.02ms - 0.11ms
unsure 🔍
-0% - +29%
+0.00ms - +0.10ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.45ms - 3.30ms-unsure 🔍
-49% - +79%
-0.93ms - +1.55ms
slower ❌
52% - 441%
0.72ms - 2.65ms
preact-local1.24ms - 2.89msunsure 🔍
-61% - +35%
-1.55ms - +0.93ms
-slower ❌
31% - 372%
0.51ms - 2.25ms
preact-hooks0.41ms - 0.96msfaster ✔
55% - 87%
0.72ms - 2.65ms
faster ✔
48% - 86%
0.51ms - 2.25ms
-

run-final

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.23ms - 0.29ms-unsure 🔍
-26% - +4%
-0.08ms - +0.02ms
unsure 🔍
-29% - +10%
-0.09ms - +0.03ms
preact-local0.25ms - 0.33msunsure 🔍
-7% - +31%
-0.02ms - +0.08ms
-unsure 🔍
-22% - +25%
-0.06ms - +0.07ms
preact-hooks0.23ms - 0.34msunsure 🔍
-13% - +34%
-0.03ms - +0.09ms
unsure 🔍
-24% - +21%
-0.07ms - +0.06ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master49.95ms - 52.41ms-unsure 🔍
-2% - +4%
-1.16ms - +2.25ms
unsure 🔍
-2% - +5%
-1.06ms - +2.51ms
preact-local49.46ms - 51.81msunsure 🔍
-4% - +2%
-2.25ms - +1.16ms
-unsure 🔍
-3% - +4%
-1.56ms - +1.93ms
preact-hooks49.17ms - 51.74msunsure 🔍
-5% - +2%
-2.51ms - +1.06ms
unsure 🔍
-4% - +3%
-1.93ms - +1.56ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.74ms - 3.77ms-unsure 🔍
-1% - +0%
-0.03ms - +0.00ms
faster ✔
8% - 9%
0.32ms - 0.37ms
preact-local3.75ms - 3.77msunsure 🔍
-0% - +1%
-0.00ms - +0.03ms
-faster ✔
8% - 9%
0.31ms - 0.36ms
preact-hooks4.08ms - 4.12msslower ❌
9% - 10%
0.32ms - 0.37ms
slower ❌
8% - 9%
0.31ms - 0.36ms
-
07_create10k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1527.27ms - 1544.89ms-unsure 🔍
-1% - +0%
-19.29ms - +6.25ms
faster ✔
2% - 4%
28.80ms - 55.75ms
preact-local1533.36ms - 1551.84msunsure 🔍
-0% - +1%
-6.25ms - +19.29ms
-faster ✔
1% - 3%
21.99ms - 49.52ms
preact-hooks1568.15ms - 1588.55msslower ❌
2% - 4%
28.80ms - 55.75ms
slower ❌
1% - 3%
21.99ms - 49.52ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master25.52ms - 25.52ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
9% - 9%
2.55ms - 2.55ms
preact-local25.52ms - 25.52msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
9% - 9%
2.55ms - 2.55ms
preact-hooks28.07ms - 28.07msslower ❌
10% - 10%
2.55ms - 2.55ms
slower ❌
10% - 10%
2.55ms - 2.55ms
-
filter_list

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master24.12ms - 24.69ms-unsure 🔍
-2% - +2%
-0.40ms - +0.42ms
slower ❌
0% - 4%
0.09ms - 0.84ms
preact-local24.09ms - 24.69msunsure 🔍
-2% - +2%
-0.42ms - +0.40ms
-slower ❌
0% - 4%
0.07ms - 0.84ms
preact-hooks23.69ms - 24.18msfaster ✔
0% - 3%
0.09ms - 0.84ms
faster ✔
0% - 3%
0.07ms - 0.84ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.75ms - 1.76ms-unsure 🔍
-0% - +1%
-0.00ms - +0.01ms
faster ✔
12% - 14%
0.24ms - 0.28ms
preact-local1.75ms - 1.75msunsure 🔍
-1% - +0%
-0.01ms - +0.00ms
-faster ✔
12% - 14%
0.25ms - 0.28ms
preact-hooks2.00ms - 2.03msslower ❌
14% - 16%
0.24ms - 0.28ms
slower ❌
14% - 16%
0.25ms - 0.28ms
-
hydrate1k

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master116.17ms - 117.78ms-unsure 🔍
-1% - +1%
-0.97ms - +1.24ms
faster ✔
0% - 2%
0.34ms - 2.65ms
preact-local116.08ms - 117.60msunsure 🔍
-1% - +1%
-1.24ms - +0.97ms
-faster ✔
0% - 2%
0.51ms - 2.75ms
preact-hooks117.64ms - 119.30msslower ❌
0% - 2%
0.34ms - 2.65ms
slower ❌
0% - 2%
0.51ms - 2.75ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master6.32ms - 6.63ms-unsure 🔍
-1% - +5%
-0.07ms - +0.29ms
faster ✔
7% - 14%
0.47ms - 1.07ms
preact-local6.28ms - 6.45msunsure 🔍
-4% - +1%
-0.29ms - +0.07ms
-faster ✔
9% - 15%
0.61ms - 1.15ms
preact-hooks7.00ms - 7.50msslower ❌
7% - 17%
0.47ms - 1.07ms
slower ❌
10% - 18%
0.61ms - 1.15ms
-
many_updates

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master33.33ms - 35.05ms-unsure 🔍
-3% - +5%
-0.90ms - +1.68ms
faster ✔
5% - 12%
1.90ms - 4.37ms
preact-local32.84ms - 34.76msunsure 🔍
-5% - +3%
-1.68ms - +0.90ms
-faster ✔
6% - 13%
2.22ms - 4.83ms
preact-hooks36.44ms - 38.21msslower ❌
5% - 13%
1.90ms - 4.37ms
slower ❌
6% - 15%
2.22ms - 4.83ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master4.81ms - 4.82ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
8% - 9%
0.45ms - 0.45ms
preact-local4.81ms - 4.82msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
8% - 9%
0.45ms - 0.45ms
preact-hooks5.26ms - 5.26msslower ❌
9% - 9%
0.45ms - 0.45ms
slower ❌
9% - 9%
0.45ms - 0.45ms
-
text_update

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master3.60ms - 3.82ms-unsure 🔍
-5% - +4%
-0.18ms - +0.15ms
faster ✔
8% - 16%
0.31ms - 0.70ms
preact-local3.61ms - 3.84msunsure 🔍
-4% - +5%
-0.15ms - +0.18ms
-faster ✔
7% - 16%
0.29ms - 0.69ms
preact-hooks4.05ms - 4.38msslower ❌
8% - 19%
0.31ms - 0.70ms
slower ❌
8% - 19%
0.29ms - 0.69ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master0.98ms - 0.98ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
faster ✔
1% - 1%
0.01ms - 0.01ms
preact-local0.98ms - 0.98msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-faster ✔
1% - 1%
0.01ms - 0.01ms
preact-hooks1.00ms - 1.00msslower ❌
2% - 2%
0.01ms - 0.01ms
slower ❌
2% - 2%
0.01ms - 0.01ms
-
todo

duration

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master52.31ms - 52.83ms-unsure 🔍
-0% - +1%
-0.22ms - +0.42ms
faster ✔
3% - 5%
1.88ms - 2.47ms
preact-local52.28ms - 52.66msunsure 🔍
-1% - +0%
-0.42ms - +0.22ms
-faster ✔
4% - 5%
2.04ms - 2.51ms
preact-hooks54.61ms - 54.89msslower ❌
4% - 5%
1.88ms - 2.47ms
slower ❌
4% - 5%
2.04ms - 2.51ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-localvs preact-hooks
preact-master1.37ms - 1.39ms-unsure 🔍
-1% - +1%
-0.02ms - +0.01ms
slower ❌
3% - 6%
0.04ms - 0.08ms
preact-local1.38ms - 1.39msunsure 🔍
-1% - +1%
-0.01ms - +0.02ms
-slower ❌
3% - 6%
0.04ms - 0.08ms
preact-hooks1.31ms - 1.34msfaster ✔
3% - 5%
0.04ms - 0.08ms
faster ✔
3% - 6%
0.04ms - 0.08ms
-

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Sep 12, 2022

Coverage Status

Coverage remained the same at 99.527% when pulling e159f84 on support-falsy-data into a8e4c99 on master.

@github-actions
Copy link

github-actions bot commented Sep 12, 2022

Size Change: +18 B (0%)

Total Size: 52.9 kB

Filename Size Change
dist/preact.js 4.02 kB +3 B (0%)
dist/preact.min.js 4.05 kB +3 B (0%)
dist/preact.min.module.js 4.04 kB +3 B (0%)
dist/preact.min.umd.js 4.08 kB +3 B (0%)
dist/preact.module.js 4.04 kB +3 B (0%)
dist/preact.umd.js 4.09 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.78 kB 0 B
compat/dist/compat.module.js 3.72 kB 0 B
compat/dist/compat.umd.js 3.85 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 239 B 0 B
devtools/dist/devtools.umd.js 314 B 0 B
hooks/dist/hooks.js 1.55 kB 0 B
hooks/dist/hooks.module.js 1.58 kB 0 B
hooks/dist/hooks.umd.js 1.63 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

value != null &&
(value !== false || (name[0] === 'a' && name[1] === 'r'))
) {
} else if (value != null && (value !== false || name.indexOf('-') != -1)) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should invert these two conditions now.

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean switch it with the remove-path? I think we would add more code in differentiating 0 and empty string

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with the current way.

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.

Different behavior with Preact on a basic React Material use case (plain TextField)
4 participants