Skip to content

ShadowNode immutability timing #39

Answered by sammy-SC
acoates-ms asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @acoates-ms,

sorry for the slow reply, I'm on a leave and come to Github sparsely.

I'll try to answer your questions but you should know I'm not 100% familiar with JavaScript's implementation but will share my mental model, which may be incomplete.

The original design only had two threads, JavaScript thread and the main thread. We had to add additional background thread for layout to match old architecture's performance characteristics on Android. In the future we may look at removal of background thread as it would simplify the threading model.

During the time the background layout is running, what tree is the JS running against? The node that JS got given in cloneNode is still no…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sammy-SC
Comment options

acoates-ms
May 31, 2022
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants