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

Android insertion performance fix WIP DO NOT MERGE #6

Closed
wants to merge 1 commit into from

Conversation

brodycj
Copy link
Collaborator

@brodycj brodycj commented Jun 4, 2018

Here is a solution for the performance issue discussed in storesafe/cordova-sqlite-evcore-extbuild-free#39, WIP for TESTING ONLY at this point. Note that this change will NOT work on iOS, macOS, or Windows, also does NOT support the androidDatabaseImplementation: 2 setting.

If this change does resolve the insertion performance issue on Android I will work on a more integrated solution that works across all supported platforms, as well as the browser platform in the near future.

To test: completely remove existing sqlite plugin, verify that no other form of sqlite plugin is installed, and install this WIP version as follows:

cordova plugin add https://github.com/mobilexag/cordova-sqlite-evplus-ext-free#cb-perf-fix-wip

@brodycj
Copy link
Collaborator Author

brodycj commented Jun 4, 2018

In general I was able to eliminate a couple loops through the sqlBatch statements as well as a per-statement subloop through the parameters. I am extremely hopeful that this will be able to bring the batch insertion performance to an acceptable level.

@tobiaswaltl
Copy link

tobiaswaltl commented Jun 12, 2018

For blocks of 2,000 inserts each, the optimization saves us approx. 600 ms on average per commit (i.e. it needs 1.6 s instead of 2.2 s). So considering that for some clients we have lots of these blocks, it is definitely a measurable performance improvement.

@brodycj
Copy link
Collaborator Author

brodycj commented Jun 12, 2018

Thanks @tobiaswaltl for the feedback. That is definitely some encouraging news though not as much as I was hoping for.

@brodycj
Copy link
Collaborator Author

brodycj commented Jul 19, 2018

Now integrated along with some other updates in #7, closing.

@brodycj brodycj closed this Jul 19, 2018
@brodycj brodycj deleted the cb-perf-fix-wip branch August 13, 2019 22:27
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.

2 participants