-
Notifications
You must be signed in to change notification settings - Fork 0
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
Simultaneously Transactions with web workers and main app #3
Comments
Thanks @fishme this is definitely a bug. The root cause is that there is a transaction queue in the main JavaScript thread and another transaction queue in the web worker. The workaround is to use I |
hi @brodybits thanks for your feedback. Well but how is the performance if I run every single sql command into Or do I see here something wrong? Best David |
Hi David, Please be sure to use Please report if this helps or not. |
My apologies, |
|
Using Probably the best solution would be parallel database access handles, similar to the parallel database readers solution in https://github.com/brodybits/cordova-sqlite-evmax-legacy-exp-free. Issue with parallel reader/writer interference discussed in brodycj/cordova-sqlite-evmax-legacy-exp-free#1 would need to be solved on native platform side in this plugin version due to possible access from multiple JavaScript threads. |
Thanks for the update I will do some tests the next days |
Hi Chris,
I was playing around with the web workers.
My use case needs to run sql commands in the web worker and to the same time sql commands in the main app.
But this runs in a critical issue.
Maybe I do something wrong, I created a small repo with this use case: https://github.com/fishme/sqlite-cordova-webworker-test
How to reproduce:
Tap fast between "Show record count" and "run webworker"
The web worker insert 10.000 records.
Tested: Android 6.0 (nexus 5x)
Maybe you have an idea, how to do it? Or is that principle not possible?
Best David
The text was updated successfully, but these errors were encountered: