Reducing code-size for web version
Currently even the minified version is a whopping 2.04 MB which is a rather heavy even when gzipped. Looking through the code, I noticed that Emscripten's canvas, SDL audio and requestAnimationFrame are included in the minified output, which are obviously not used by SQLite.
When compiling only for browser, ENVIRONMENT_IS_NODE and ENVIRONMENT_IS_SHELL would be false and could be dead-code eliminated. Also, the filesystem and TTY also takes out a substantial chunk of code which could be unnecessary. _sysconf is also ever called with 30 so it could be aggressively inlined.
I wonder if there are options to set which could reduce the code size?
Recent emscripten versions have improvements here, so an update might help. There are also a bunch of options one could try.
That's funny that the compiled version overwhelmingly uses right shift (>>) and sometimes even on 0 (>>0).
I think right shift is for fast division, and is especially useful for pointer arithmetic. Nothing abnormal here.
But I agree this project HAS TO be recompiled with a recent version of emscripten.