Skip to content

Evaluate Module vs Run Script? #25880

Closed Answered by bartlomieju
linrongbin16 asked this question in Q&A
Discussion options

You must be logged in to vote

load_main_es_module uses the v8::script_compiler::compile_module to compile the main module, and also created all the module dependencies from it (like a dependency tree). At this time, all the modules that stores on local file system is synchronizely loaded, all the remote modules that need to be downloaded is still in fetching status.

By the time load_main_es_module all remote modules need to be downloaded and loaded into the V8 as well

run_event_loop start to running the event loop, so all the remote modules can be downloaded, all the async and Promise can be resolved, until the javascript code in the main module been all executed to done.

Remote modules are already downloaded, thi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@linrongbin16
Comment options

Answer selected by linrongbin16
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