-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enabling SQLite FTS5 module by default. #199
base: master
Are you sure you want to change the base?
Conversation
Compiled using EMSCRIPTEN 1.37.9.
+1 for this; if the FTS5 engine is on, that'd allow search indexes created by other languages to be used in JS in the browser. |
sql.js is already quite a huge dependency to have. I don't think adding other modules by default is a good idea. But compiling different versions for different needs is a good idea. |
I believe I am able to have FTS5 running. Here are the procedures:
In the next few weeks, I will try to test the performance of FTS5 by adding thousands of documents. |
@3CE8D2BAC65BDD6AA9 Thank you for posting the steps. I was also able to run FTS5 but this pull request was to enable it by default inside |
@@ -4,7 +4,7 @@ EMSCRIPTEN?=/usr/bin | |||
|
|||
EMCC=$(EMSCRIPTEN)/emcc | |||
|
|||
CFLAGS=-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DLONGDOUBLE_TYPE=double -DSQLITE_INT64_TYPE="long long int" -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS | |||
CFLAGS=-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DLONGDOUBLE_TYPE=double -DSQLITE_INT64_TYPE="long long int" -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the SQLITE_THREADSAFE
default setting? Was this intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the same thing but no clue why there is such a different.
I am open to the idea of making such compile time extensions into different versions of sql.js (such as memory-growth, debug, etc). Would that be a good solution here? Can we expect future extensions to pass the standard test suite? Would a standard procedure for adding such extensions help in the future? |
Would be nice to have an extra flavor with FTS5 enabled. |
I also wonder if that would be a good idea to include it by default, but I definitely would love to have a ready-made version with FTS5 enabled. |
Compiled using EMSCRIPTEN 1.37.9.
Tests:
Same error I get on master [6dc4ac5].