Cache and re-use pthread blob URL when using mainScriptUrlOrBlob#26883
Cache and re-use pthread blob URL when using mainScriptUrlOrBlob#26883sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
mainScriptUrlOrBlob#26883Conversation
Gemini seemed to think this might help with emscripten-core#26882
|
Hmm.. this didn't seems to fix the error, but probably worth landing anyway. |
mainScriptUrlOrBlob
mainScriptUrlOrBlobmainScriptUrlOrBlob
|
@juj are you also seeing failure/flakes on your waterfall related to mainScriptUrlOrBlob? |
|
Why is this an improvement? These blobs are not very large are they? (the referenced data might be, but this doesn't help there..?) Maybe I'm looking at this wrong. |
|
Maybe I'm misunderstanding. IIUC in this case the blob size is the entire size of the JS program (the one the runs in each pthread). This means that |
|
Anyway, it didn't fix the regression :( |
|
I believe Blobs only refer to their data, though. They are thin wrappers. So this might reuse the wrapper but not save the large JS, since createObjectURL just refers to the Blob. This is unlike a data URL where the actual data is copied. |
Commented on #26882 (comment) |
Without this change the blobURL is constructed for each thread that is created.
Gemini seemed to think this might help with #26882
In any case this seems like obvious improvement, even though I imagine
mainScriptUrlOrBlobhas very few users.