4 ms·
The ELIMINATE_DUPLICATE_FUNCTIONS support was contributed by Tableau Software, by the team I'm on. It's quite expensive processing wise, but is worth a shot see
by hackcasual 10y ago
The ELIMINATE_DUPLICATE_FUNCTIONS support was contributed by Tableau Software, by the team I'm on. It's quite expensive processing wise, but is worth a shot seeing if your code base benefits from it. Our usecase leverages a lot of shared pointer based templated classes, which tends to create a lot of delete functions that boil down to free(this);
2 other points I'd add to this overall:
1) Can't emphasize enough how bad exception support is for size, expect in the neighborhood of 30% size increase. This is due to needing to handle all of the possible ways functions can return. Even with exception support disabled, you can still throw them, you just can't catch them in C++ land.
2) goto's. There's a few good reasons to use these, especially in code that needs to make sure cleanup code always runs. Emscripten supports that with a couple different code constructs, pretty much all of which cause a significant amount of bloat. We've saved ~100k in some cases by specifically targeting some 3rd party code that made use of them and rewritting them to not have gotos.
- vmorgulis 10y ago> Even with exception support disabled, you can still throw them, you just can't catch them in C++ land. Is something printed in the console under emscripten if an exception is thrown?
- hackcasual 10y agoIt gets converted into a Javascript exception, which will at least give you the Emscripten converted function it was thrown in.
- vmorgulis 10y agoInteresting. Thank you.