Skip to content

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented May 27, 2025

Copy of #2608

Uncommented the failing cases and added a few extra that were listed in #2607 but didn't make it into our test files. It's certainly a bit bigger and likely a bit slower but thought I'd at least put this up as a suggestion as I happened to remember it.

Copy link

github-actions bot commented May 27, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +1% (-8.00ms - +13.09ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.03ms - +0.02ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.63ms - +1.68ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +2% (-0.06ms - +0.38ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.43ms - +1.14ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +2% (-0.11ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +2% (-0.18ms - +0.81ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +4% (-0.12ms - +1.32ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -4% - +5% (-0.26ms - +0.38ms)
    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% - +2% (-0.03ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    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-local1045.37ms - 1060.05ms-unsure 🔍
-1% - +1%
-8.00ms - +13.09ms
preact-main1042.59ms - 1057.74msunsure 🔍
-1% - +1%
-13.09ms - +8.00ms
-

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.53ms - 16.57ms-unsure 🔍
-0% - +0%
-0.03ms - +0.02ms
preact-main16.54ms - 16.57msunsure 🔍
-0% - +0%
-0.02ms - +0.03ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.53ms - 1.54ms-unsure 🔍
-1% - +0%
-0.01ms - +0.01ms
preact-main1.53ms - 1.54msunsure 🔍
-0% - +1%
-0.01ms - +0.01ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local73.12ms - 75.65ms-unsure 🔍
-2% - +2%
-1.63ms - +1.68ms
preact-main73.29ms - 75.42msunsure 🔍
-2% - +2%
-1.68ms - +1.63ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local7.34ms - 7.81ms-unsure 🔍
-4% - +5%
-0.26ms - +0.38ms
preact-main7.30ms - 7.73msunsure 🔍
-5% - +3%
-0.38ms - +0.26ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.20ms - 16.51ms-unsure 🔍
-0% - +2%
-0.06ms - +0.38ms
preact-main16.04ms - 16.36msunsure 🔍
-2% - +0%
-0.38ms - +0.06ms
-

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 #4723
  • Commit: a02a441

duration

VersionAvg timevs preact-localvs preact-main
preact-local60.36ms - 61.53ms-unsure 🔍
-1% - +2%
-0.43ms - +1.14ms
preact-main60.06ms - 61.12msunsure 🔍
-2% - +1%
-1.14ms - +0.43ms
-

usedJSHeapSize

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

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local25.55ms - 26.16ms-unsure 🔍
-2% - +1%
-0.60ms - +0.27ms
preact-main25.71ms - 26.33msunsure 🔍
-1% - +2%
-0.27ms - +0.60ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local31.67ms - 33.05ms-unsure 🔍
-1% - +6%
-0.16ms - +1.80ms
preact-main30.85ms - 32.23msunsure 🔍
-6% - +0%
-1.80ms - +0.16ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local27.55ms - 28.50ms-unsure 🔍
-3% - +1%
-0.99ms - +0.40ms
preact-main27.82ms - 28.83msunsure 🔍
-1% - +4%
-0.40ms - +0.99ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local25.54ms - 26.60ms-unsure 🔍
-3% - +2%
-0.77ms - +0.62ms
preact-main25.69ms - 26.59msunsure 🔍
-2% - +3%
-0.62ms - +0.77ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local21.70ms - 22.88ms-unsure 🔍
-3% - +5%
-0.56ms - +1.04ms
preact-main21.50ms - 22.59msunsure 🔍
-5% - +3%
-1.04ms - +0.56ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.11ms - 20.97ms-unsure 🔍
-1% - +4%
-0.23ms - +0.89ms
preact-main19.85ms - 20.57msunsure 🔍
-4% - +1%
-0.89ms - +0.23ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 220
  • Built by: CI #4723
  • Commit: a02a441

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.07ms - 2.16ms-unsure 🔍
-5% - +2%
-0.11ms - +0.05ms
preact-main2.08ms - 2.20msunsure 🔍
-3% - +5%
-0.05ms - +0.11ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.16ms - 1.20ms-unsure 🔍
-3% - +2%
-0.03ms - +0.02ms
preact-main1.16ms - 1.20msunsure 🔍
-2% - +3%
-0.02ms - +0.03ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.19ms - 34.12ms-unsure 🔍
-1% - +2%
-0.18ms - +0.81ms
preact-main33.17ms - 33.51msunsure 🔍
-2% - +1%
-0.81ms - +0.18ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.95ms - 31.06ms-unsure 🔍
-0% - +4%
-0.12ms - +1.32ms
preact-main29.44ms - 30.37msunsure 🔍
-4% - +0%
-1.32ms - +0.12ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.94ms - 2.94ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main2.93ms - 2.94msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-

tachometer-reporter-action v2 for CI

Copy link

github-actions bot commented May 27, 2025

Size Change: +138 B (+0.3%)

Total Size: 46.6 kB

Filename Size Change
compat/dist/compat.js 3.78 kB +47 B (+1.26%)
compat/dist/compat.mjs 3.69 kB +47 B (+1.29%)
compat/dist/compat.umd.js 3.83 kB +44 B (+1.16%)
ℹ️ View Unchanged
Filename Size
debug/dist/debug.js 3.85 kB
debug/dist/debug.mjs 3.85 kB
debug/dist/debug.umd.js 3.94 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 271 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.65 kB
dist/preact.mjs 4.66 kB
dist/preact.umd.js 4.72 kB
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.mjs 1.54 kB
hooks/dist/hooks.umd.js 1.58 kB
jsx-runtime/dist/jsxRuntime.js 861 B
jsx-runtime/dist/jsxRuntime.mjs 830 B
jsx-runtime/dist/jsxRuntime.umd.js 934 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@rschristian rschristian changed the title chore: Port more correct non-dimensional regex to v11 refactor (v11): Improve accuracy of non-dimensional regex May 28, 2025
@@ -13,4 +13,4 @@ export function shallowDiffers(a, b) {
}

export const IS_NON_DIMENSIONAL =
/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;
Copy link
Member

@JoviDeCroock JoviDeCroock May 29, 2025

Choose a reason for hiding this comment

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

My main concern here is that this is a significant byte size increase for something that I'm not sure is worth it because style doesn't feel that widely used

Copy link
Member Author

Choose a reason for hiding this comment

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

While I don't love it, I figure if we are going to offer this (which we're probably stuck with), it should be correct. Intentionally not supporting ~1/4 of the properties we should feels a bit bad for 47b in compat.

I don't have strong opinions either way though, can't say I even recall using style recently myself.

Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

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

Let's rebase and get in

@rschristian rschristian force-pushed the chore/port-non-dimensional-regex-fix branch from 121b0a8 to a02a441 Compare May 31, 2025 02:35
@rschristian rschristian merged commit 16926e4 into v11-2 May 31, 2025
12 checks passed
@rschristian rschristian deleted the chore/port-non-dimensional-regex-fix branch May 31, 2025 02:42
JoviDeCroock pushed a commit that referenced this pull request Jun 6, 2025
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 19, 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.

2 participants