Closed Bug 1003125 Opened 9 years ago Closed 9 years ago
compare the size of the emscripten'ed CLD with the native binary
In bug 971047, we have preferred using emscripten to import CLD, but if the resulting file turns out to be significantly larger than the native binary sizes, we may want to reconsider (or consider spending more time on shrinking the resulting files). Here is the data from my initial testing: (Florian Quèze from bug 971047 comment #81) > Created attachment 8391241 [details] [diff] [review] > Build a binary to get data about code size > > I pushed to try a moz.build file that causes the build to create cld2 binary > library. > Unfortunately the Linux and Windows builds failed: > https://tbpl.mozilla.org/?tree=Try&rev=3985f2aa1ac5 > > Here is the data I have about binary vs emscripten'ed size: > > emscripten: > cld-worker.js 481372 bytes + cld-worker.js.mem 1108936 bytes > Total: 1590308 bytes (1553kB) > > binary: > From my local x86_64 Mac build: > libcld2.dylib 1300792 bytes (1270kB) > From the try server's universal build: > libcld2.dylib 2576004 bytes (2515kB)
Flags: firefox-backlog? → firefox-backlog+
Assignee: nobody → florian
Status: NEW → ASSIGNED
Whiteboard: p=5 → p=5 s=it-32c-31a-30b.2 [qa?]
Whiteboard: p=5 s=it-32c-31a-30b.2 [qa?] → p=5 s=it-32c-31a-30b.2 [qa-]
This builds on my linux debug build.
This now builds on Windows too. I pushed it to try at https://tbpl.mozilla.org/?tree=Try&rev=572bd93ae18e Here are the results: Windows: firefox/browser/cld2.dll 1145072 bytes (1118kB) Linux32: firefox/browser/libcld2.so 1259905 bytes (1230kB) Linux64: firefox/browser/libcld2.so 1364595 bytes (1333kB) Mac try builds with translation enabled are currently busted, but I had a number before: Mac: libcld2.dylib 2576004 bytes (2515kB)
Attachment #8424806 - Attachment is obsolete: true
Here's a comparison of the size of the omni.ja file with and without cld.js: cld.js included: firefox/browser/omni.ja 8482578 bytes (8284kB) cld.js removed: firefox/browser/omni.ja 7254323 bytes (7084kB) Difference: 1228255 bytes (1199kB) Here's a comparison of the packaged size: cld.js included: firefox-32.0a1.en-US.linux-i686.tar.bz2 47480285 (46367kB) cld.js removed: firefox-32.0a1.en-US.linux-i686.tar.bz2 46204248 (45121kB) Difference: 1276037 ( 1246kB) For this comparison I used the Linux32 build from https://tbpl.mozilla.org/?tree=Try&rev=572bd93ae18e and pushed the attached patch to try at https://tbpl.mozilla.org/?tree=Try&rev=ab5480cbc914
Conclusions: - the asm.js and binary versions have almost the same installed size on Windows (the asm.js version weights 81kB more). - the asm.js version is slightly smaller than the binary on Linux (31 and 134kB smaller for 32 and 64 bit builds respectively). - the asm.js version is significantly (1316kB) smaller on Mac, because the binary is an universal build.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: p=5 s=it-32c-31a-30b.2 [qa-] → [translation] p=5 s=it-32c-31a-30b.2 [qa-]
You need to log in before you can comment on or make changes to this bug.