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

fix reordering issue of memoized component when the component initially render null #2988

Merged

Conversation

tanhauhau
Copy link
Contributor

Found a reorder issue for memoised component, as the oldVNode.vnode._children still points to the oldVNode, causing it to not able to find the correct nextSibling through getDomSibling

@github-actions
Copy link

github-actions bot commented Feb 8, 2021

📊 Tachometer Benchmark Results

Summary

⏳ Benchmarks are currently running. Results below are out of date.

duration

  • 02_replace1k: unsure 🔍 -0% - +4% (-0.76ms - +8.37ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -7% - +0% (-2.78ms - +0.04ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -2% - +2% (-22.12ms - +26.36ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -2% - +3% (-0.55ms - +0.91ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -2% - +0% (-3.07ms - +0.30ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -7% - +3% (-2.43ms - +1.14ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -3% - +3% (-0.08ms - +0.08ms)
    preact-local vs preact-master

usedJSHeapSize

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

⏳ Benchmarks are currently running. Results below are out of date.
02_replace1k

duration

VersionAvg timevs preact-mastervs preact-local
preact-master213.63ms - 219.71ms-unsure 🔍
-4% - +0%
-8.37ms - +0.76ms
preact-local217.08ms - 223.88msunsure 🔍
-0% - +4%
-0.76ms - +8.37ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.57ms - 3.58ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-local3.57ms - 3.58msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master75.09ms - 77.67ms-unsure 🔍
-2% - +3%
-1.28ms - +1.96ms
preact-local75.07ms - 77.01msunsure 🔍
-3% - +2%
-1.96ms - +1.28ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master113.66ms - 116.37ms-unsure 🔍
-3% - +1%
-3.27ms - +1.05ms
preact-local114.44ms - 117.81msunsure 🔍
-1% - +3%
-1.05ms - +3.27ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master136.31ms - 139.66ms-slower ❌
0% - 6%
0.28ms - 7.62ms
preact-local130.76ms - 137.30msfaster ✔
0% - 6%
0.28ms - 7.62ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master77.01ms - 79.41ms-unsure 🔍
-6% - +1%
-4.51ms - +0.65ms
preact-local77.86ms - 82.43msunsure 🔍
-1% - +6%
-0.65ms - +4.51ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master148.95ms - 153.65ms-slower ❌
4% - 13%
6.02ms - 17.23ms
preact-local134.58ms - 144.76msfaster ✔
4% - 11%
6.02ms - 17.23ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master79.35ms - 81.75ms-faster ✔
2% - 7%
1.59ms - 5.98ms
preact-local82.50ms - 86.17msslower ❌
2% - 7%
1.59ms - 5.98ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mastervs preact-local
preact-master35.79ms - 37.76ms-unsure 🔍
-0% - +8%
-0.04ms - +2.78ms
preact-local34.40ms - 36.41msunsure 🔍
-7% - +0%
-2.78ms - +0.04ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.50ms - 3.51ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-local3.50ms - 3.50msunsure 🔍
-0% - -0%
-0.01ms - +0.00ms
-
07_create10k

duration

VersionAvg timevs preact-mastervs preact-local
preact-master1364.27ms - 1397.77ms-unsure 🔍
-2% - +2%
-26.36ms - +22.12ms
preact-local1365.63ms - 1400.67msunsure 🔍
-2% - +2%
-22.12ms - +26.36ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.97ms - 25.97ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-local25.97ms - 25.97msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
filter_list

duration

VersionAvg timevs preact-mastervs preact-local
preact-master28.53ms - 29.46ms-unsure 🔍
-3% - +2%
-0.91ms - +0.55ms
preact-local28.61ms - 29.74msunsure 🔍
-2% - +3%
-0.55ms - +0.91ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.58ms - 1.59ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local1.59ms - 1.59msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-mastervs preact-local
preact-master153.86ms - 156.00ms-unsure 🔍
-0% - +2%
-0.30ms - +3.07ms
preact-local152.25ms - 154.86msunsure 🔍
-2% - +0%
-3.07ms - +0.30ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.17ms - 6.18ms-unsure 🔍
-0% - +0%
-0.02ms - +0.00ms
preact-local6.17ms - 6.19msunsure 🔍
-0% - +0%
-0.00ms - +0.02ms
-
many_updates

duration

VersionAvg timevs preact-mastervs preact-local
preact-master32.42ms - 35.10ms-unsure 🔍
-3% - +7%
-1.14ms - +2.43ms
preact-local31.93ms - 34.30msunsure 🔍
-7% - +3%
-2.43ms - +1.14ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.83ms - 4.83ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local4.83ms - 4.83msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
text_update

duration

VersionAvg timevs preact-mastervs preact-local
preact-master3.10ms - 3.21ms-unsure 🔍
-3% - +3%
-0.08ms - +0.08ms
preact-local3.09ms - 3.22msunsure 🔍
-3% - +3%
-0.08ms - +0.08ms
-

usedJSHeapSize

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

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Feb 8, 2021

Coverage Status

Coverage increased (+0.001%) to 99.442% when pulling 1509959 on tanhauhau:tanhauhau/fix-memo-reorder into bd10bf5 on preactjs:master.

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.

This is fantastic 🙌

@marvinhagemeister marvinhagemeister merged commit 700529f into preactjs:master Feb 8, 2021
@tanhauhau tanhauhau deleted the tanhauhau/fix-memo-reorder branch February 10, 2021 02:12
This was referenced Mar 15, 2021
This was referenced Mar 15, 2021
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.

4 participants