satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

Remove sqlite from web version. Closes GH-2 #132

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

https://github.com/satoshinm/NetCraft/issues Remove sqlite dependency in emscripten target, slow/large/unnecessary for web

Current status: fails to run, still used by offline mode web

satoshinm commented 7 years ago

Wow, this saves many megabytes! Before:

-rw-r--r--@ 1 admin  staff    61K May 16 20:12 336craft.html.mem
-rw-r--r--@ 1 admin  staff   3.7M May 16 20:12 336craft.js
-rw-r--r--@ 1 admin  staff   1.4M May 16 20:13 336craft.wasm

after, the .wasm is down to 194 KB (!) from 1.4 MB and .js from 3.7 MB down to 1.3 MB, without sqlite ("light" is relative, after all):

-rw-r--r--@ 1 admin  staff    26K May 16 20:11 341craft.html.mem
-rw-r--r--@ 1 admin  staff   1.3M May 16 20:11 341craft.js
-rw-r--r--@ 1 admin  staff   194K May 16 20:13 341craft.wasm

No observable change in functional behavior.