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

Simplify top-level render and remove dead code #2940

Merged
merged 3 commits into from Jan 19, 2021

Conversation

andrewiggins
Copy link
Member

Simplify top-level render a bit by removing IS_HYDRATE constant and making sure we use the same condition for checking replaceNode everywhere so it gzips better.

Also, remove some code from our suspended hydration catching mechanism I believe is unused. It bubbles up the value of the _hydrating flag to the VNode that catches the suspension. However in our Suspense implementation, it looks at the value of the _hydrating on the VNode that suspended (not Suspense itself) to determine if a node suspended while hydrating. So we have no need to bubble up the _hydrating flag.

@github-actions
Copy link

github-actions bot commented Jan 18, 2021

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.59ms - +0.43ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -5% - +4% (-1.74ms - +1.33ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +1% (-6.39ms - +9.25ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -0% - +2% (-0.07ms - +0.47ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -1% - +1% (-1.35ms - +1.47ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -8% - +6% (-2.56ms - +1.83ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -0% - +5% (-0.00ms - +0.14ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -0% - +0% (-0.01ms - +0.02ms)
    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

Results

02_replace1k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 80
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master145.10ms - 145.79ms-unsure 🔍
-0% - +0%
-0.43ms - +0.59ms
preact-local144.99ms - 145.73msunsure 🔍
-0% - +0%
-0.59ms - +0.43ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.60ms - 3.61ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.60ms - 3.61msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master55.06ms - 55.64ms-unsure 🔍
-2% - +1%
-1.09ms - +0.55ms
preact-local54.86ms - 56.38msunsure 🔍
-1% - +2%
-0.55ms - +1.09ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master86.11ms - 86.96ms-unsure 🔍
-1% - +1%
-1.23ms - +0.72ms
preact-local85.91ms - 87.67msunsure 🔍
-1% - +1%
-0.72ms - +1.23ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master99.70ms - 100.62ms-unsure 🔍
-1% - +1%
-0.97ms - +1.26ms
preact-local99.01ms - 101.03msunsure 🔍
-1% - +1%
-1.26ms - +0.97ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master53.37ms - 54.02ms-unsure 🔍
-1% - +1%
-0.55ms - +0.35ms
preact-local53.48ms - 54.11msunsure 🔍
-1% - +1%
-0.35ms - +0.55ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master100.20ms - 105.17ms-unsure 🔍
-4% - +3%
-4.31ms - +2.74ms
preact-local100.96ms - 105.97msunsure 🔍
-3% - +4%
-2.74ms - +4.31ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master53.86ms - 54.29ms-unsure 🔍
-1% - +1%
-0.29ms - +0.34ms
preact-local53.82ms - 54.28msunsure 🔍
-1% - +1%
-0.34ms - +0.29ms
-
03_update10th1k_x16
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 80
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master34.28ms - 36.58ms-unsure 🔍
-4% - +5%
-1.33ms - +1.74ms
preact-local34.21ms - 36.25msunsure 🔍
-5% - +4%
-1.74ms - +1.33ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.52ms - 3.53ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.52ms - 3.53msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
07_create10k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master1589.17ms - 1600.49ms-unsure 🔍
-1% - +0%
-9.25ms - +6.39ms
preact-local1590.86ms - 1601.66msunsure 🔍
-0% - +1%
-6.39ms - +9.25ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.99ms - 25.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local25.99ms - 25.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter_list
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master24.74ms - 25.10ms-unsure 🔍
-2% - +0%
-0.47ms - +0.07ms
preact-local24.92ms - 25.33msunsure 🔍
-0% - +2%
-0.07ms - +0.47ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.60ms - 1.60ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local1.60ms - 1.60msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 50
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master134.59ms - 136.40ms-unsure 🔍
-1% - +1%
-1.47ms - +1.35ms
preact-local134.47ms - 136.64msunsure 🔍
-1% - +1%
-1.35ms - +1.47ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.19ms - 6.21ms-unsure 🔍
-0% - +0%
-0.02ms - +0.01ms
preact-local6.19ms - 6.21msunsure 🔍
-0% - +0%
-0.01ms - +0.02ms
-
many_updates
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 80
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master30.35ms - 33.66ms-unsure 🔍
-6% - +8%
-1.83ms - +2.56ms
preact-local30.19ms - 33.08msunsure 🔍
-8% - +6%
-2.56ms - +1.83ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.85ms - 4.85ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local4.85ms - 4.85msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
text_update
  • Browser: chrome-headless 87.0.4280.141
  • Sample size: 230
  • Built by: CI #734
  • Commit: 51a2004

duration

VersionAvg timevs preact-mastervs preact-local
preact-master2.98ms - 3.06ms-unsure 🔍
-5% - +0%
-0.14ms - +0.00ms
preact-local3.03ms - 3.16msunsure 🔍
-0% - +5%
-0.00ms - +0.14ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master0.83ms - 0.83ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-local0.83ms - 0.83msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for CI

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 99.43% when pulling 1b7fb44 on golfing-render into 7bc661b on master.

@github-actions
Copy link

Size Change: -51 B (0%)

Total Size: 42.3 kB

Filename Size Change
dist/preact.js 4.04 kB -12 B (0%)
dist/preact.min.js 4.06 kB -15 B (0%)
dist/preact.module.js 4.07 kB -7 B (0%)
dist/preact.umd.js 4.1 kB -17 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.45 kB 0 B
compat/dist/compat.module.js 3.47 kB 0 B
compat/dist/compat.umd.js 3.51 kB 0 B
debug/dist/debug.js 2.99 kB 0 B
debug/dist/debug.module.js 2.98 kB 0 B
debug/dist/debug.umd.js 3.07 kB 0 B
devtools/dist/devtools.js 186 B 0 B
devtools/dist/devtools.module.js 196 B 0 B
devtools/dist/devtools.umd.js 261 B 0 B
hooks/dist/hooks.js 1.13 kB 0 B
hooks/dist/hooks.module.js 1.15 kB 0 B
hooks/dist/hooks.umd.js 1.2 kB 0 B
jsx-runtime/dist/jsxRuntime.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 335 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 405 B 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

@andrewiggins andrewiggins changed the title Simplify top-level render and remove dead code (-14 B) Simplify top-level render and remove dead code Jan 18, 2021
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 🙌

@marvinhagemeister marvinhagemeister merged commit 565928d into master Jan 19, 2021
@marvinhagemeister marvinhagemeister deleted the golfing-render branch January 19, 2021 07:44
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.

None yet

3 participants