-
Notifications
You must be signed in to change notification settings - Fork 714
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
Memory issue for adding large number of records. #18
Comments
awaiting your response |
FIrst, which platform do you see this on and do you see this issue in the emulator? It would help if you can make a small test program to reproduce this issue. Thanks, |
function doTest() {
} //doTest |
hi this is the sample test code to insert 80000 records in 3 tables... |
Thanks I will try it this weekend and let you know. Chris On Friday, October 25, 2013, sonalk wrote:
Sent from my mobile |
Thanks will wait for your response.. |
Thank you for posting the test program. I can now see the problem in the simulator and it will be a tough one to solve. It looks like it is running out of memory within the Javascript part. I have also recently seen a similar problem in a JSON decoder. I cannot promise when I can find a solution. Is there any chance you can try splitting up the population into multiple transaction calls? |
yes sure i ll split the transaction and update you with the result |
Limitation, needs to be investigated further and documented in readme. Batch SQL API would really help! |
This limitation is now documented in README.md. |
Is there any way that you could specify in more detail what you see to be the problem in the JavaScript? We have a large international project hanging on this. I'm not asking you to fix it. I'd like to see if I can fix it for you. I've got the go-ahead to devote some time to it. |
If you try to run the test program on Android, the Java code will crash |
Thanks. Scott J. Pearson From: Chris Brody <notifications@gh.neting.ccmailto:notifications@github.com>
If you try to run the test program on Android, the Java code will crash — |
Reopening as a bug, hoping to find a solution. Will add an automatic test case for this. UPDATE: This is caused by the JSON framework that is used in the Cordova project itself. I will make an isolated test scenario for Cordova (without this plugin) and raise a bug report when I get a chance. |
Of course its super slow the insertion, if you are inserting 2 values in one executeSQL, I also noticed the select can be really slow if I am using Join in my query. My workaround was simple (and silly ), I created a table, and inserted the result of the join, so I don't have to use multiple joins. |
Here is my simple example https://gist.github.com/reconka/370b8aeb21215dbbd712 , please paste into chrome/safari web developer console and change the limitation variable |
@Rekona your problem has nothing to do with this issue. This issue is specifically about a crash that happens on the Android version only, which happens when the Java side of the Cordova framework attempts to decode the JSON message before calling the |
I have added a test based on the reproduction test program by @sonalk to the It fixes the JSON problem in the Javascript --> Android Java direction by sending the data as a flat array instead of an array of Javascript/JSON objects. I was able to pass the rest of the test suite that is in the |
I just submitted https://issues.apache.org/jira/browse/CB-9353 to report this issue on the Apache Cordova project. |
Solution is now given in https://github.com/litehelpers/Cordova-sqlite-enterprise-free under GPL or purchased commercial license options. |
Hi Brodybits, |
Hi Brodybits, Is there a trail version for the 'Cordova-sqlite-enterprise-free ' plugin to try out if it really fixes my out of memory issue and then purchase the licensed version? Thanks, |
hi,
i m aiming to use this plugin to store around 40 tables with 40000 records in each table but my it doesnt store records more than 70000 for a single table and not more than 40000 for 2 tables. i think there is some memory issue.
i also tried increasing the memory using
SQLiteDatabase mydb = SQLiteDatabase.openOrCreateDatabase(dbfile, null); mydb.setMaximumSize(300_1024_1024);
but still the same problem.
Also i wanted to know where are these tables stored on the phone.
Hoping to get a response very soon.
Thanks,
Sonal
The text was updated successfully, but these errors were encountered: