Skip to content

SIDE_MODULE and USE_PTHREADS provoke memory growth #17034

Answered by kripken
alexander-veselov asked this question in Q&A
Discussion options

You must be logged in to vote

@sbc100 Is it the case that loading a dynamic library compiles on that pthread, so each pthread ends up recompiling the same code? (Unlike with the main module, which we compile once and just send that to the workers.)

I'm not sure how we could improve that. To send the compiled dynamic library we'd need to do an async postMessage. Perhaps with Asyncify or stack switching we could pause and wait for that.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@sbc100
Comment options

@alexander-veselov
Comment options

@sbc100
Comment options

@alexander-veselov
Comment options

@sbc100
Comment options

Answer selected by alexander-veselov
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