smee204
Junior Member
Posts: 45
Joined: May 2011
Reputation: 0
|
smee204 Wrote:I have had a quick look so far and it looks like the slowest part is not receiving the data but inserting it into the local phone database.
On my system it takes 5892ms to sync and 4416ms of that is inserting the data. I am investigating...
Think I have worked out how to speed it up a lot. Will give it a go tomorrow.
|
|
find
quote
|
gfoldv
Senior Member
Posts: 115
Joined: Oct 2009
Reputation: 5
Location: in the dutch mountains
|
In general the ContentProvider.applyBatch is slow because it does a lot of string comparison operation to turn the URIs to tables. The ContentResolver.bulkInsert is faster although "This function make no guarantees about the atomicity of the insertions".
|
|
find
quote
|
freezy
Team-XBMC Android Remote Developer
Posts: 866
Joined: Dec 2006
Reputation: 14
Location: Switzerland
|
@hunkyn: Direct MySQL access probably isn't such a good idea, because most a) most people probably don't use MySQL anyway and b) as smee204 stated fetching the data is not the bottleneck.
Smee204 I'm looking forward to your result! Cheers!
|
|
find
quote
|