Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up JavaScript from unneeded exported functions #1589

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

carlopi
Copy link
Collaborator

@carlopi carlopi commented Jan 17, 2024

This drastically reduce the size of the generated JavaScript worker code, from 45M uncompressed to 2M, and reduces also the time spent processing the JS file and creating a bunch of (unnecessary) wrappers.

Problem is connected to dynamic loading of extensions, since I haven't found a proper way to express "symbol should be available to other dlopen-ed modules BUT it's not needed on the JavaScript side".

I am not sure whether this is a current Emscripten limitation or if the compiler wrapper should be invoked in a different way.

Current solution is blunt and exploit current Emscripten specifics code-generation around var wasmExports = createWasm();. This needs to be reworked to be compatible with future versions.

Basically before this PR for any symbol exported at the C++ level a function like:

var __function_name = Module["__function_name"] = (a0) => (__function_name = Module["__function_name"] = wasmExports["_function_name"])(a0);

would be generated.

Multiplied 80K symbols, it meant a lot of JavaScript code had to be downloaded, parsed and executed for no actual use.

This should solve #1561, but I will have to properly check after this gets merged.

This adds a (compile-time) dependency on awk (that should be widely available) and on the npm module js-beautify.

This is currently done in an blunt way via awk.
Proper solution would be for Emscripten to have a way to expose two layers: C[++] functions that needs to be externally visible to other dlopened modules and C[++] functions that needs to be exposed to the JS side
@carlopi carlopi mentioned this pull request Jan 17, 2024
@carlopi
Copy link
Collaborator Author

carlopi commented Jan 17, 2024

I was discussing the PR with @Mause, that suggested adding a sample of the lines that are filtered out:

            var __ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => (__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = wasmExports["_ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_"] = (a0, a1) => (__ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_"] = wasmExports["_ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_"])(a0, a1);
            var __ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = (a0, a1, a2, a3, a4, a5, a6) => (__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = wasmExports["_ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"])(a0, a1, a2, a3, a4, a5, a6);
            var __ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = (a0, a1, a2, a3, a4, a5, a6) => (__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = wasmExports["_ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"])(a0, a1, a2, a3, a4, a5, a6);
            var __ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = (a0, a1, a2, a3, a4, a5, a6) => (__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = wasmExports["_ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"])(a0, a1, a2, a3, a4, a5, a6);
            var __ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => (__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = wasmExports["_ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
            var __ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_"] = (a0, a1) => (__ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_"] = wasmExports["_ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_"])(a0, a1);
            var __ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
            var __ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);

Average symbol name is 100 chars, repeated 5 times in the same line, multiplied 80K symbols.

@carlopi carlopi changed the title Clean-up JavaScript from unneded exported functions Clean-up JavaScript from unneeded exported functions Jan 17, 2024
@Mytherin Mytherin merged commit f25219d into duckdb:main Jan 17, 2024
15 checks passed
@Mytherin
Copy link
Contributor

Thanks! Let's give it a shot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants