android - too much work for one thread(database performance) -


at moment develope android app receives data bluetooth , store these data in local database. therefore wrote class called datamanager manages local database (inserts, reads, deletes...). first checked needed time save local generated data. storing 10000 objects takes 100ms. if receive data bluetooth , store it, takes 1700ms. not fast enough because receive 10000 objects per second.

i think it's because receive , store work 1 thread. call datamanager inside thread receives data bluetooth.

now asking myself how speed storing while receiving data?

i tried call store function of datamanager class in asynctask, more slow without asynctask.

how can speedup storing operation during receiving? bounded service storing? can use multi cores?

i happy recommendation


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -