-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
chore(hydration): Test approach to comment markers #4444
Open
JoviDeCroock
wants to merge
8
commits into
main
Choose a base branch
from
test-out-comment-markers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+119
−5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10k
duration
usedJSHeapSize
filter-list
duration
usedJSHeapSize
hydrate1k
duration
usedJSHeapSize
many-updates
duration
usedJSHeapSize
replace1k
duration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-update
duration
usedJSHeapSize
todo
duration
usedJSHeapSize
update10th1k
duration
usedJSHeapSize
|
Size Change: +824 B (+1.33%) Total Size: 62.6 kB
ℹ️ View Unchanged
|
JoviDeCroock
force-pushed
the
test-out-comment-markers
branch
2 times, most recently
from
July 15, 2024 08:22
74210d4
to
1281599
Compare
JoviDeCroock
requested review from
developit,
andrewiggins and
marvinhagemeister
July 15, 2024 08:51
JoviDeCroock
commented
Jul 15, 2024
JoviDeCroock
force-pushed
the
test-out-comment-markers
branch
5 times, most recently
from
July 16, 2024 15:27
eae64dd
to
7041375
Compare
marvinhagemeister
approved these changes
Jul 17, 2024
JoviDeCroock
commented
Aug 29, 2024
JoviDeCroock
force-pushed
the
test-out-comment-markers
branch
from
August 30, 2024 06:21
5365b51
to
8a931f5
Compare
Thompson1985
approved these changes
Oct 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #4442
Implementation from preactjs/preact-render-to-string#376
This implements a hydration approach with the comment markers, one thing that's noteworthy is that
oldDom
in ourdiffChildren
algorithm becomes stale.We diff the wrapping element of the Suspense and non-suspenseful child, we get to an oldDom which is the first child-node of said series. When we suspend we don't move oldDom, we can try and move it inside of
diff
but this won't affect the continueddiffChildren
so we are stuck inserting that node in front of our oldDom.This has been solved in 647d138 through correctly skipping comment nodes while placing children.
I think the last part of this research would be to set up a comprehensive test suite for both
renderToStringAsync
as well asrenderToStream
so we can have fixtures for this behaviour, what do you all think?