Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3b9e5e3
Prototype binary encoding.
juj Mar 5, 2024
059699a
Fix Closure minification around binaryDecode() function.
juj Mar 5, 2024
735af53
Make binary encoding work in default runtime.
juj Mar 6, 2024
ed9b7e1
Default enable SINGLE_FILE_BINARY_ENCODE
juj Mar 6, 2024
926fde4
Remove old code
juj Mar 6, 2024
85d6ea4
Cleanup encoding code
juj Mar 6, 2024
e199eb0
Flake
juj Mar 6, 2024
23007c1
Flake
juj Mar 6, 2024
451fc77
tools\maint\update_settings_docs.py
juj Mar 6, 2024
cdd1719
Simplify
juj Mar 6, 2024
d4c8067
Fix Closure invocation.
juj Mar 6, 2024
6435c68
Rebaseline code size tests.
juj Mar 6, 2024
426c9d2
Fix typo
juj Mar 6, 2024
ca63b7b
Fix browser.test_single_file_worker_js
juj Mar 6, 2024
a27937f
Fix browser.test_modularize
juj Mar 6, 2024
7eb94f2
Proper ifdef gate.
juj Mar 6, 2024
66db56c
Remove code duplication.
juj Mar 6, 2024
46fa3b8
Resolve todo
juj Mar 6, 2024
0fad312
eslint
juj Mar 6, 2024
bb8f0f5
Disable SINGLE_FILE_BINARY_ENCODE by default
juj Mar 7, 2024
f8d9641
Fix refactoring.
juj Mar 8, 2024
0317531
Include test for -sSINGLE_FILE_BINARY_ENCODE=0/1 modes.
juj Mar 8, 2024
3ac3aab
Address review
juj Mar 26, 2024
514759b
Merge remote-tracking branch 'origin/main' into binary_encode
juj Mar 26, 2024
77badc9
Merge remote-tracking branch 'origin/main' into binary_encode
juj Aug 27, 2024
ea729f0
Fix merge
juj Aug 27, 2024
1b163d2
Clean up merge
juj Aug 27, 2024
09c5aa8
Run tools\maint\update_settings_docs.py
juj Aug 27, 2024
da757b9
Rebaseline code size tests
juj Aug 27, 2024
9abe835
Add new test for WebGL 2 code size in binary encoded singlefile mode.…
juj Aug 27, 2024
b7e9a2c
Fix call to binaryDecode() after merge
juj Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add new test for WebGL 2 code size in binary encoded singlefile mode.…
… Improvement from previous base64 encoding to binary encoding is:

size of a.html == 17586, expected 18839, delta=-1253 (-6.65%)
size of a.html.gz == 10152, expected 10973, delta=-821 (-7.48%)
Total output size=17586 bytes, expected total size=18839, delta=-1253 (-6.65%)
Total output size gzipped=10152 bytes, expected total size gzipped=10973, delta=-821 (-7.48%)
Hey amazing, overall generated code size was improved by 1253 bytes!
  • Loading branch information
juj committed Aug 27, 2024
commit 9abe8359929f9eb4482574a34393c2388a4d980c
6 changes: 6 additions & 0 deletions test/code_size/hello_webgl2_wasm_singlefile_wasm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"a.html": 17586,
"a.html.gz": 10152,
"total": 17586,
"total_gz": 10152
}
2 changes: 1 addition & 1 deletion test/other/codesize/test_codesize_files_wasmfs.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50948
50942
5 changes: 4 additions & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -8536,7 +8536,7 @@ def test_unoptimized_code_size(self):
# We don't care too about unoptimized code size but we would like to keep it
# under control to a certain extent. This test allows us to track major
# changes to the size of the unoptimized and unminified code size.
# Run with `--rebase` when this test fails.
# Run with `--rebaseline` when this test fails.
self.build(test_file('hello_world.c'), emcc_args=['-O0', '--output_eol=linux'])
self.check_expected_size_in_file('wasm',
test_file('other/test_unoptimized_code_size.wasm.size'),
Expand Down Expand Up @@ -10920,6 +10920,7 @@ def test_function_exports_are_small(self, args, opt, closure):
'random_printf_wasm2js': ('random_printf', True),
'hello_webgl_wasm': ('hello_webgl', False),
'hello_webgl_wasm2js': ('hello_webgl', True),
'hello_webgl2_wasm_singlefile': ('hello_webgl2_wasm_singlefile', False),
'hello_webgl2_wasm': ('hello_webgl2', False),
'hello_webgl2_wasm2js': ('hello_webgl2', True),
'math': ('math', False),
Expand Down Expand Up @@ -10966,6 +10967,7 @@ def test_minimal_runtime_code_size(self, test_name, js, compare_js_output=False)
'-lGL',
'-sMODULARIZE']
hello_webgl2_sources = hello_webgl_sources + ['-sMAX_WEBGL_VERSION=2']
hello_webgl2_wasm_singlefile_sources = hello_webgl2_sources + ['-sSINGLE_FILE']
hello_wasm_worker_sources = [test_file('wasm_worker/wasm_worker_code_size.c'), '-sWASM_WORKERS', '-sENVIRONMENT=web,worker']
embind_hello_sources = [test_file('code_size/embind_hello_world.cpp'), '-lembind']
embind_val_sources = [test_file('code_size/embind_val_hello_world.cpp'),
Expand All @@ -10980,6 +10982,7 @@ def test_minimal_runtime_code_size(self, test_name, js, compare_js_output=False)
'hello_webgl': hello_webgl_sources,
'math': math_sources,
'hello_webgl2': hello_webgl2_sources,
'hello_webgl2_wasm_singlefile': hello_webgl2_wasm_singlefile_sources,
'hello_wasm_worker': hello_wasm_worker_sources,
'embind_val': embind_val_sources,
'embind_hello': embind_hello_sources,
Expand Down
Loading