-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add support for precompiled statements #704
Comments
Hm. I was thinking about different implementation: on the Since our Queries are immutable, we can actually create precompiled statement per query (and as ThreadLocals if needed) and store them as as fixed size LIFO map in I don't want to add any new public API for this feature if possible. Does it sound ok? Please cc Stas, also known as "Stas — DB EXPERT", here |
Nice idea! |
Well, we can try implement that and then decide whether it should be option On 1 Nov 2016 9:01 am, "Dmitrii Nikitin" [email protected] wrote:
|
As I mentioned in #427 SQLiteDatabase.insertWithOnConflict which is used by StorIO under the hood, creates Btw I like @artem-zinnatullin idea with LIFO map in SQLiteOpenHelper. I know that there are some concerns about it how this feature can affect whole library, so I would like to propose following approach: add this feature to v1.12.0 as an experimental one (similar approach as new features are introduces to RxJava library), which could be enabled by users who looks for performance boost and it could be turned on by default for later versions. What do you think? |
SGTM, @nikitin-da you'll be able to test it in Yandex.Mail since it uses DB all the time and see if it increases performance or not! |
LowLevel
getter for underlyingsqLiteOpenHelper
.The same thing has been already implemented in
StorIOContentResolver.LowLevel
and it can solve problems with such particular thinks like precompiled statements if user will need it.StorIOSqlite
likecompiledExecute
,compiledUpdateDelete
,compiledInsert
that will take a special type of resolver to bind arguments.@artem-zinnatullin @karlicoss @thevery any thought?
Refs Add info about performance in the README #427
The text was updated successfully, but these errors were encountered: