Skip to content

Commit d5e710c

Browse files
authored
[Docs] Fix docs about embedding overhead (#20529)
fixes #20501
1 parent 3630336 commit d5e710c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

site/source/docs/porting/files/packaging_files.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ Packaging Files
66

77
This topic shows how to package the files that will be used to populate :ref:`Emscripten's virtual file system <file-system-overview>` when the page is loaded.
88

9-
There are two alternatives for how files are packaged: *preloading* and *embedding*. Embedding puts the specified files inside the generated JavaScript, while preloading packages the files separately. Embedding files is much less efficient than preloading and should only be used when packaging small numbers of small files. Preloading also enables the option to separately host the data.
9+
There are two alternatives for how files are packaged: *preloading* and
10+
*embedding*. Embedding stores the specified files inside the wasm file, while
11+
preloading packages them in a bundle on the side. Embedding files is more
12+
efficient than preloading because there isn't a separate file to download and
13+
copy, but preloading enables the option to separately host the data.
1014

1115
*Emcc* uses the *file packager* to package the files and generate the :ref:`File System API <Filesystem-API>` calls that create and load the file system at run time. While *Emcc* is the recommended tool for packaging, there are cases where it can make sense to run the *file packager* manually.
1216

0 commit comments

Comments
 (0)