Skip to content

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented Sep 27, 2025

Fixes #4920

Fiddling w/ size & perf but I'm not really happy with this as it's such a niche need. MathML really should've reused <foreignObject> or created something similar.

Copy link

github-actions bot commented Sep 28, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +0% (-2.47ms - +4.20ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - -0% (-0.06ms - -0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +2% (-1.02ms - +1.65ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -3% - +4% (-0.55ms - +0.73ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.56ms - +1.04ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +11% (-0.09ms - +0.23ms)
    preact-local vs preact-main
  • todo: slower ❌ 0% - 2% (0.09ms - 0.57ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -4% - +2% (-1.32ms - +0.79ms)
    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.01ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -11% - +1% (-0.75ms - +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 🔍 -2% - +2% (-0.02ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +0% (-0.01ms - +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-local908.13ms - 912.60ms-unsure 🔍
-0% - +0%
-2.47ms - +4.20ms
preact-main907.02ms - 911.98msunsure 🔍
-0% - +0%
-4.20ms - +2.47ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.53ms - 16.57ms-unsure 🔍
-0% - -0%
-0.06ms - -0.00ms
preact-main16.56ms - 16.61msunsure 🔍
+0% - +0%
+0.00ms - +0.06ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.52ms - 70.48ms-unsure 🔍
-1% - +2%
-1.02ms - +1.65ms
preact-main68.27ms - 70.09msunsure 🔍
-2% - +1%
-1.65ms - +1.02ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local6.19ms - 6.66ms-unsure 🔍
-11% - +1%
-0.75ms - +0.07ms
preact-main6.42ms - 7.10msunsure 🔍
-1% - +12%
-0.07ms - +0.75ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.24ms - 17.13ms-unsure 🔍
-3% - +4%
-0.55ms - +0.73ms
preact-main16.14ms - 17.06msunsure 🔍
-4% - +3%
-0.73ms - +0.55ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.72ms - 3.72ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main3.72ms - 3.72msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #5166
  • Commit: 86c70d6

duration

VersionAvg timevs preact-localvs preact-main
preact-local61.56ms - 62.65ms-unsure 🔍
-1% - +2%
-0.56ms - +1.04ms
preact-main61.28ms - 62.45msunsure 🔍
-2% - +1%
-1.04ms - +0.56ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.99ms - 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.04ms - 25.84ms-unsure 🔍
-2% - +2%
-0.55ms - +0.61ms
preact-main24.99ms - 25.83msunsure 🔍
-2% - +2%
-0.61ms - +0.55ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local31.77ms - 32.76ms-unsure 🔍
-2% - +2%
-0.76ms - +0.62ms
preact-main31.85ms - 32.82msunsure 🔍
-2% - +2%
-0.62ms - +0.76ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local31.31ms - 32.01ms-unsure 🔍
-2% - +2%
-0.54ms - +0.48ms
preact-main31.32ms - 32.06msunsure 🔍
-2% - +2%
-0.48ms - +0.54ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local24.49ms - 24.80ms-unsure 🔍
-1% - +1%
-0.29ms - +0.18ms
preact-main24.52ms - 24.88msunsure 🔍
-1% - +1%
-0.18ms - +0.29ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local26.04ms - 27.57ms-unsure 🔍
-2% - +6%
-0.55ms - +1.57ms
preact-main25.56ms - 27.02msunsure 🔍
-6% - +2%
-1.57ms - +0.55ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.48ms - 21.04ms-unsure 🔍
-1% - +3%
-0.20ms - +0.60ms
preact-main20.28ms - 20.85msunsure 🔍
-3% - +1%
-0.60ms - +0.20ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 240
  • Built by: CI #5166
  • Commit: 86c70d6

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.10ms - 2.32ms-unsure 🔍
-4% - +11%
-0.09ms - +0.23ms
preact-main2.03ms - 2.26msunsure 🔍
-10% - +4%
-0.23ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.99ms - 1.02ms-unsure 🔍
-2% - +2%
-0.02ms - +0.02ms
preact-main0.99ms - 1.02msunsure 🔍
-2% - +2%
-0.02ms - +0.02ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local31.34ms - 31.73ms-slower ❌
0% - 2%
0.09ms - 0.57ms
preact-main31.08ms - 31.34msfaster ✔
0% - 2%
0.09ms - 0.57ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.25ms - 1.26ms-unsure 🔍
-1% - +0%
-0.01ms - +0.01ms
preact-main1.25ms - 1.26msunsure 🔍
-0% - +1%
-0.01ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local32.16ms - 33.48ms-unsure 🔍
-4% - +2%
-1.32ms - +0.79ms
preact-main32.26ms - 33.90msunsure 🔍
-2% - +4%
-0.79ms - +1.32ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.94ms - 2.95ms-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 Sep 28, 2025

Size Change: +105 B (+0.22%)

Total Size: 47.5 kB

Filename Size Change
dist/preact.js 4.71 kB +37 B (+0.79%)
dist/preact.mjs 4.73 kB +36 B (+0.77%)
dist/preact.umd.js 4.79 kB +32 B (+0.67%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.9 kB
compat/dist/compat.mjs 3.82 kB
compat/dist/compat.umd.js 3.95 kB
debug/dist/debug.js 3.9 kB
debug/dist/debug.mjs 3.9 kB
debug/dist/debug.umd.js 3.98 kB
devtools/dist/devtools.js 263 B
devtools/dist/devtools.mjs 273 B
devtools/dist/devtools.umd.js 348 B
hooks/dist/hooks.js 1.53 kB
hooks/dist/hooks.mjs 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 892 B
jsx-runtime/dist/jsxRuntime.mjs 861 B
jsx-runtime/dist/jsxRuntime.umd.js 966 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 force-pushed the fix/xhtml-in-mathml branch 2 times, most recently from db0885d to 79d4929 Compare September 28, 2025 00:24
@coveralls
Copy link

coveralls commented Sep 28, 2025

Coverage Status

coverage: 99.535%. remained the same
when pulling 86c70d6 on fix/xhtml-in-mathml
into 8e3e4ce on main.

@rschristian rschristian changed the title junk: Vitest doesn't run locally so I guess I'm testing in the CI fix: Support XHTML phrasing content in MathML token elements Sep 28, 2025
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, nice fix!

@rschristian rschristian marked this pull request as ready for review September 29, 2025 14:08
@rschristian rschristian merged commit 5e18356 into main Sep 29, 2025
13 checks passed
@rschristian rschristian deleted the fix/xhtml-in-mathml branch September 29, 2025 14:45
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.

MathML: HTML phrasing children of <mi> are created in MathML namespace

4 participants