-
Notifications
You must be signed in to change notification settings - Fork 664
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
Alasql vs WebSQL perf test - actually store data? #47
Comments
This is absolutely true. Initally Alasql was designed as "in-memory" database, and it was compared just on standard set of operation in memory. For some people (like me), this is was the point - to have fast sorting and groupng procedures on the client side (even without storage operations). And of course, like any other tests, this test is applicable to very specific situation, defined with a number of SQL statements, described in the test. To do not mislead anyone in future, I will mention this fact in README.md file. Thank you! Some more facts about Alasql and WebSQL:
|
I modified the test to allow the both databases work pure in memory (test compares only SELECT statement) and remove any caching functionality (i.e. cache for precompiled SELECT statements and preliminary prepared indexes): |
Personally I'd be more interested in seeing how it works when it's actually writing things to disk, especially given that (in PouchDB anyway) the big bottleneck is always writes rather than reads. But thanks for making it clearer what's going on! :) |
Here s one more test with preindexed WebSQL database: http://jsperf.com/alasql-js-vs-websql/7 Could you share or send a link to PouchDB tests to make comparable tests for the same data sets? |
Sure, our performance docs are here: https://github.com/pouchdb/pouchdb/blob/master/TESTING.md#performance-tests Unfortunately we don't have any JSPerf tests set up, so you have to run them manually. (At the time we wrote our tests, JSPerf still didn't support async tests.) JSPerf tests are definitely on my TODO list, though. 😛 |
Thank you for the tests! What do I think: I can write adapter between Alasql and PouchDB, so users It will looks like: alasql('ATTACH POUCHDB DATABASE one; USE one; SELECT * FROM table_1 JOIN This disk operations are the bottleneck of HTML/JS, and PouchDB has a Andrey 2015-01-26 19:41 GMT+03:00 Nolan Lawson notifications@github.com:
|
BTW: this jsPerf test it async. Try to edit it and you will see the async flag. Then add 2015-01-26 20:26 GMT+03:00 Andrey Gershun agershun@gmail.com:
|
Did you ever got further into the PouchDB test idea? |
Not yet. But thank you for reminding. |
Any chance anyone has a performance comparison between Alasql and IndexedDB to share? |
Really? On a 9 year old issue? |
Hey, really cool library. I tried out the Alasql vs WebSQL perf test, though, and I was kinda surprised to see that it didn't seem to be actually storing anything in LocalStorage/IndexedDB/anywhere.
So apparently it's using the in-memory version of the database? If so, the test is a little misleading, because WebSQL is actually writing stuff to disk (and it's asynchronous), whereas Alasql is just doing everything in memory.
The text was updated successfully, but these errors were encountered: