Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Installing vs_tool 0.9.3 almost doubled "release" build js size compared to 0.9.2 #34

Closed
virtualcodewarrior opened this issue Apr 25, 2014 · 6 comments

Comments

@virtualcodewarrior
Copy link

I just installed version 0.9.3 of the vs_tool and after installing this version my "release" build almost doubled in size.
with vs_tool 0.9.2 -> size of js = 7599 KB
after installing 0.9.3 -> size of js = 13374 KB

The generated BC files still have the same size so I assume that changes to the linker settings are causing this.
I didn't update any of the other parts of emscripten and didn't modify any settings in my project.
Switching back to the older version fixes the problem

@virtualcodewarrior virtualcodewarrior changed the title Installing vs_tool 0.9.3 almost doubled "release" build compared to 0.9.2 Installing vs_tool 0.9.3 almost doubled "release" build js size compared to 0.9.2 Apr 25, 2014
@juj
Copy link
Owner

juj commented May 1, 2014

With those two versions, can you use the "echo command lines" option for the linker and cross-check the changes?

@virtualcodewarrior
Copy link
Author

output vs_tool 0.9.2 :

1>------ Build started: Project: myproject_min, Configuration: Release Emscripten ------
1>Build started 01/05/2014 08:54:39.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(D:\prj\dev\myproject\src\Emscripten\Release\myproject_min.js) does not match the Linker's OutputFile property value (D:\prj\dev\myproject\Emscripten\Release\myproject_min_release.js). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>Link:
1>  C:\Program Files (x86)\Emscripten\emscripten\1.12.0\emcc.bat D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/app_strings.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/FormatString.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/InputFile.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/NumberParser.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/mfccompatstring.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/asprintf.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/awsprintf.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/interface.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/stdafx.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/stepmanager.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/xcallbacks.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/myproject.o D:/prj/dev/myproject/Emscripten/Release/xInterface.bc D:/prj/dev/myproject/Emscripten/Release/x.bc D:/prj/dev/myproject/Emscripten/Release/xIFS.bc D:/prj/dev/myproject/Emscripten/Release/xParser.bc D:/prj/dev/myproject/Emscripten/Obj/Release/UnicodeEscape/UnicodeEscape.bc -o D:/prj/dev/myproject/src/../Emscripten/Release/myproject_min_release.js -O2 -s EXPORTED_FUNCTIONS="['_Runapp','_Startapp', '_NextStep', '_Finishapp', '_SetMInstanceValueWithDName', '_SetMValueWithDName','_SendNMCommand','_Stopapp','_SetDebugMessages']"  -s ALLOW_MEMORY_GROWTH=1 --js-library mslib.js
1>GCCLINK : warning root: Disabling asm.js validation for memory growth (memory can grow, but you lose some amount of speed)
1>GCCLINK : warning : Output contains some very large functions, consider using OUTLINING_LIMIT to break them up (see settings.js)
1>  myproject.vcxproj -> D:\prj\dev\myproject\src\Emscripten\Release\myproject_min.js
1>CustomBuildStep:
1>Skipping target "CustomBuildStep" because it has no outputs.
1>CustomBuildStep:
1>Skipping target "CustomBuildStep" because it has no outputs.
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:35.27
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Emcc Linker property page General settings for vs_tool 0.9.2 are :

output vs_tool 0.9.3 :

1>------ Build started: Project: myproject_min, Configuration: Release Emscripten ------
1>Build started 01/05/2014 09:03:15.

1>Link:
1>  C:\Program Files (x86)\Emscripten\emscripten\1.12.0\emcc.bat D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/app_strings.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/FormatString.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/InputFile.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/NumberParser.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/mfccompatstring.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/asprintf.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/awsprintf.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/interface.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/stdafx.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/stepmanager.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/xcallbacks.o D:/prj/dev/myproject/src/../Emscripten/Obj/Release/myproject_min/myproject.o D:/prj/dev/myproject/Emscripten/Release/xInterface.bc D:/prj/dev/myproject/Emscripten/Release/x.bc D:/prj/dev/myproject/Emscripten/Release/xIFS.bc D:/prj/dev/myproject/Emscripten/Release/xParser.bc D:/prj/dev/myproject/Emscripten/Obj/Release/UnicodeEscape/UnicodeEscape.bc -o D:/prj/dev/myproject/src/../Emscripten/Release/myproject_min_release.js -O2 --minify 0 -s EXPORTED_FUNCTIONS="['_Runapp','_Startapp', '_NextStep', '_Finishapp', '_SetMInstanceValueWithDName', '_SetMValueWithDName','_SendNMCommand','_Stopapp','_SetDebugMessages']"  -s ALLOW_MEMORY_GROWTH=1 --js-library mslib.js --closure 0
1>GCCLINK : warning root: Disabling asm.js validation for memory growth (memory can grow, but you lose some amount of speed)
1>GCCLINK : warning : Output contains some very large functions, consider using OUTLINING_LIMIT to break them up (see settings.js)
1>  myproject.vcxproj -> D:\prj\dev\myproject\src\..\Emscripten\Release\myproject_min_release.js
1>CustomBuildStep:
1>Skipping target "CustomBuildStep" because it has no outputs.
1>CustomBuildStep:
1>Skipping target "CustomBuildStep" because it has no outputs.
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:34.99
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

And here is a screen shot of the linker general settings page for the two tools (I didn't manually change any of the settings, just installed the new tool)

vstoolcompare

@brunofrima
Copy link

Same problem here. I've got exactly the same linker settings than virtualcodewarrior and my build size went from 6287 KB to 10058 KB.

@juj
Copy link
Owner

juj commented May 30, 2014

I think it's the case that in the old compiler which 0.9.2 targeted, minification was off by default (--minify option), and now it's become on by default, which 0.9.3 is targeting. Try resetting the line "Force JS Code Minifier Run" to its default state, which should say "Yes" with a non-bolded text.

If that doesn't work, can you enable the "Echo Command Lines" option for both compile and link panels, and send me back the results?

@brunofrima
Copy link

Resetting the minifer option to the default value did the trick. The js file size is now back to what it used to be.

Thanks a lot!

@juj
Copy link
Owner

juj commented May 30, 2014

Great!

@juj juj closed this as completed May 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants