Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Shrink the binary size #13
consider using gles.js js runtime...
It's a 3MB uncompressed file, compared to liquidPlayer's 22Mb file...
The lib file is regular v8 engine. It's specific to arm hence it's small size. Use it as you would regular v8 and ignore any additional webgl bindings (which are external to the .so file anyway).
example apk demos here: http://tmtg.net/glesjs/
gles.js is simply v8 with call outs to OpenGL calls (bindings) and a fake xhr request routing to local android file system files. A small js shim script file is executed first, inside v8 to fake DOM/canvas and regular webGL api. This reduces the effort to port your normal webgl browser code, into gles.js thanks to this shim file.
To quote from the author:
Use the existing libglesjs.so file in the gles project, and follow the example gles cpp/jni code on how to initialize, runScript() / ie. parser()
Alright guys, starting off 2017 with a slimmer Jasonette!
We switched out the JS engine and now the entire APK size is at 10MB! That's over 75% smaller than before! https://twitter.com/jasonclient/status/815919678409347072
Here's the related PR #42
We took some time to make sure this works for not just the core JSON parser but also other JS files we've been using, including the CSV parser and the RSS parser, thanks to @brad
There is room for making it even smaller (By splitting binary/giving up on x86) but for now I think 10MB is good enough. If anyone wants to look further into this you're welcome to do so though.