Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiments #1

Open
wants to merge 15 commits into
base: wasm
Choose a base branch
from
Open

Experiments #1

wants to merge 15 commits into from

Conversation

Taytay
Copy link
Owner

@Taytay Taytay commented Nov 5, 2018

This builds upon my work in the WASM Branch: https://github.com/kripken/sql.js/pull/255
I have disabled a number of SQLite features and have optimized for size, bringing the wasm build down to 631KB (60KB loader file + 571KB wasm file).
(These files, when compressed (zip), are ~21KB and ~269KB, meaning the across-the-wire cost would be approx 290KB.)

(It doesn't due to the bug in node/worker detection though)
In my tests, compiling C code with -Oz and then compiling Js with -Oz leads to _very_ small files and good performance.
* wasm:
  Adding the load_sql_file.js that the tests depend upon
  The worker test would theoretically work if run by itself
  The test files now work correctly if run individually
  Add package.json scripts to test the various compiled builds
@mikeptweet
Copy link

This is awesome work. Thank you so much

@Taytay
Copy link
Owner Author

Taytay commented Nov 5, 2018

You bet @mikeptweet! Thanks for the kind words.

@mikeptweet
Copy link

Any idea what the hold up is for getting this in the main branch?

@Taytay Taytay changed the base branch from master to wasm January 7, 2019 15:36
Taytay added 3 commits May 12, 2019 20:31
Note that after the merge, and before the commit, I rebuilt with the latest version of Emscripten (emscripten-1.38.31)

* master: (26 commits)
  fixed some errors
  Update README.md
  fix repl example
  fix examples
  Fix simple example
  Rename exported_runtime_methods and exported_functions
  Add a GUI/index.html to redirect to examples/GUI/index.html
  Ignore /sqlite-src and /cache folders
  Upgrade to Sqlite 3.28.0
  Build with 1.38.30 of Emscripten
  Add example in Makefile showing how we could compile a worker-only wrapper
  Remove Node uncaughtException handler
  Minor: test_blob.js formatting
  Improve README for 1.0
  Add and modify existing examples
  Fix loading of worker module
  Add latest compiled assets
  WIP: Update the README to show async usage and describe versions of the library
  Fix bugs with the modularization
  Rename most folders for clarity
  ...

# Conflicts:
#	Makefile
#	dist/sql-asm-debug.js
#	dist/sql-wasm-debug.js
#	dist/worker.sql-asm-debug.js
#	dist/worker.sql-wasm-debug.js
#	js/sql-memory-growth.js
#	js/sql-wasm-debug.wasm
#	js/sql-wasm.js
#	js/sql-wasm.wasm
#	js/sql.js
#	js/worker.sql-wasm.js
#	js/worker.sql.js
logankeenan added a commit to logankeenan/sql.js that referenced this pull request Nov 19, 2021
@akshatdev0
Copy link

@Taytay

As with the release of https://github.com/sqlite/sqlite-wasm with OPFS persistence.

Can we do the same optimizations that you did in this branch on sqlite-wasm github repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants