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 the template tag #4639

Merged
merged 5 commits into from
Jan 19, 2025
Merged

Support the template tag #4639

merged 5 commits into from
Jan 19, 2025

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Jan 19, 2025

Resolves #4635

This builds out support for the template tag, the test asserts that the document fragment contains the tags we've rendered into it.

Copy link

github-actions bot commented Jan 19, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +0% (-5.45ms - +2.34ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.05ms - +0.08ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -0% - +2% (-0.30ms - +1.17ms)
    preact-local vs preact-main
  • many-updates: slower ❌ 0% - 2% (0.00ms - 0.37ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.36ms - +0.82ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -1% - +5% (-0.01ms - +0.09ms)
    preact-local vs preact-main
  • todo: faster ✔ 0% - 1% (0.01ms - 0.35ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -4% - +3% (-1.42ms - +1.00ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -4% - +4% (-0.37ms - +0.46ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.02ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +0% (-0.02ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +1% (-0.00ms - +0.02ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local938.21ms - 943.16ms-unsure 🔍
-1% - +0%
-5.45ms - +2.34ms
preact-main939.24ms - 945.25msunsure 🔍
-0% - +1%
-2.34ms - +5.45ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.20ms - 19.21ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main19.20ms - 19.20msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.55ms - 16.66ms-unsure 🔍
-0% - +0%
-0.05ms - +0.08ms
preact-main16.56ms - 16.61msunsure 🔍
-0% - +0%
-0.08ms - +0.05ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.52ms - 1.55ms-unsure 🔍
-1% - +1%
-0.01ms - +0.02ms
preact-main1.52ms - 1.54msunsure 🔍
-1% - +1%
-0.02ms - +0.01ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local65.19ms - 66.47ms-unsure 🔍
-0% - +2%
-0.30ms - +1.17ms
preact-main65.02ms - 65.77msunsure 🔍
-2% - +0%
-1.17ms - +0.30ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local10.25ms - 10.84ms-unsure 🔍
-4% - +4%
-0.37ms - +0.46ms
preact-main10.21ms - 10.79msunsure 🔍
-4% - +3%
-0.46ms - +0.37ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.58ms - 16.93ms-slower ❌
0% - 2%
0.00ms - 0.37ms
preact-main16.51ms - 16.63msfaster ✔
0% - 2%
0.00ms - 0.37ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.75ms - 3.77ms-unsure 🔍
-0% - +0%
-0.00ms - +0.02ms
preact-main3.75ms - 3.76msunsure 🔍
-0% - +0%
-0.02ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4291
  • Commit: 1cc11c5

duration

VersionAvg timevs preact-localvs preact-main
preact-local66.11ms - 67.19ms-unsure 🔍
-1% - +1%
-0.36ms - +0.82ms
preact-main66.19ms - 66.65msunsure 🔍
-1% - +1%
-0.82ms - +0.36ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.97ms - 2.99ms-unsure 🔍
-1% - +0%
-0.02ms - +0.01ms
preact-main2.97ms - 3.00msunsure 🔍
-0% - +1%
-0.01ms - +0.02ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.04ms - 30.56ms-unsure 🔍
-1% - +1%
-0.45ms - +0.29ms
preact-main30.11ms - 30.65msunsure 🔍
-1% - +2%
-0.29ms - +0.45ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local34.71ms - 35.96ms-unsure 🔍
-0% - +5%
-0.10ms - +1.61ms
preact-main34.00ms - 35.17msunsure 🔍
-5% - +0%
-1.61ms - +0.10ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.50ms - 25.76ms-unsure 🔍
-1% - +1%
-0.23ms - +0.24ms
preact-main25.42ms - 25.82msunsure 🔍
-1% - +1%
-0.24ms - +0.23ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local25.70ms - 27.14ms-unsure 🔍
-4% - +3%
-1.19ms - +0.70ms
preact-main26.06ms - 27.28msunsure 🔍
-3% - +5%
-0.70ms - +1.19ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local23.74ms - 24.99ms-faster ✔
0% - 7%
0.08ms - 1.82ms
preact-main24.71ms - 25.91msslower ❌
0% - 8%
0.08ms - 1.82ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local21.67ms - 22.16ms-unsure 🔍
-1% - +2%
-0.23ms - +0.41ms
preact-main21.63ms - 22.03msunsure 🔍
-2% - +1%
-0.41ms - +0.23ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 220
  • Built by: CI #4291
  • Commit: 1cc11c5

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.00ms - 2.08ms-unsure 🔍
-1% - +5%
-0.01ms - +0.09ms
preact-main1.96ms - 2.03msunsure 🔍
-5% - +1%
-0.09ms - +0.01ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.11ms - 1.11ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main1.11ms - 1.11msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.03ms - 34.26ms-faster ✔
0% - 1%
0.01ms - 0.35ms
preact-main34.21ms - 34.44msslower ❌
0% - 1%
0.01ms - 0.35ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.23ms - 1.23ms-unsure 🔍
-1% - +1%
-0.01ms - +0.01ms
preact-main1.22ms - 1.23msunsure 🔍
-1% - +1%
-0.01ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local31.18ms - 32.71ms-unsure 🔍
-4% - +3%
-1.42ms - +1.00ms
preact-main31.22ms - 33.10msunsure 🔍
-3% - +4%
-1.00ms - +1.42ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.91ms - 2.93ms-unsure 🔍
-0% - +1%
-0.00ms - +0.02ms
preact-main2.91ms - 2.92msunsure 🔍
-1% - +0%
-0.02ms - +0.00ms
-

tachometer-reporter-action v2 for CI

Copy link

github-actions bot commented Jan 19, 2025

Size Change: +102 B (+0.16%)

Total Size: 62.4 kB

Filename Size Change
dist/preact.js 4.71 kB +18 B (+0.38%)
dist/preact.min.js 4.73 kB +15 B (+0.32%)
dist/preact.min.module.js 4.73 kB +20 B (+0.42%)
dist/preact.min.umd.js 4.75 kB +16 B (+0.34%)
dist/preact.module.js 4.72 kB +15 B (+0.32%)
dist/preact.umd.js 4.77 kB +18 B (+0.38%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.12 kB
compat/dist/compat.module.js 4.05 kB
compat/dist/compat.umd.js 4.19 kB
debug/dist/debug.js 3.83 kB
debug/dist/debug.module.js 3.83 kB
debug/dist/debug.umd.js 3.91 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.54 kB
hooks/dist/hooks.module.js 1.57 kB
hooks/dist/hooks.umd.js 1.61 kB
jsx-runtime/dist/jsxRuntime.js 978 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.module.js 477 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@coveralls
Copy link

coveralls commented Jan 19, 2025

Coverage Status

coverage: 99.618%. remained the same
when pulling 1cc11c5 on support-template
into cad1daf on main.

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.

Sweet, thanks for making a PR! Removed the 'content' in dom check as template tags are guaranteed to have a fragment per spec.

@JoviDeCroock JoviDeCroock merged commit 4b7e231 into main Jan 19, 2025
13 checks passed
@JoviDeCroock JoviDeCroock deleted the support-template branch January 19, 2025 10:56
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.

Bug: <template> elements rendered incorrectly
3 participants