Skip to content

Library speed when inserting large amounts of RawContacts #317

Answered by vestrel00
marrale asked this question in Q&A
Discussion options

You must be logged in to vote

@marrale, I'm excited to tell you that I have pushed up the alpha tag; 0.3.2-alpha1 !!

Please feel free to use it. Just note that I will not publish a formal release for it. Everything in that tag and perhaps more will be incorporated in the upcoming 0.3.2 release.

Please use the following code snippet to insert large quantities of RawContacts in the fastest way possible when using this library,

contactsApi
    .insert()
    .rawContacts(newRawContacts)
    .allowBlanks(true)
    .validateAccounts(false)
    .validateGroupMemberships(false)
    .include()
    .commitInChunks()

Apart from the other optimizations I made, I also implemented your suggestion. Please use commitInChunks instead of

Replies: 3 comments 17 replies

Comment options

You must be logged in to vote
11 replies
@vestrel00
Comment options

@vestrel00
Comment options

@vestrel00
Comment options

@vestrel00
Comment options

Answer selected by marrale
@marrale
Comment options

@marrale
Comment options

@vestrel00
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@vestrel00
Comment options

@marrale
Comment options

@vestrel00
Comment options

@marrale
Comment options

@vestrel00
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested performance Improvements to memory and/or cpu usage
2 participants