performance
I have two performance problems:
1)
it is normal that a service remains stopped for two seconds ago block all program?
The service is configured as follows:
# Region Module Attributes
# StartAtBoot: true
# StartCommandReturnValue: android.app.Service.START_STICKY
# End Region
2) I need to read (in Service) all the phone numbers in the address book, however, for each phone number takes too long time!
This instruction allows me to read quickly:
ContactsList= PhoneContacts.GetAll (False, False)
still continuing,
...
Dim c As Contact
c = ContactsList.get (i)
For j = 0 To c.GetPhones.Size-1
c.GetPhones.GetKeyAt (j) 'This statement it takes you 8ms up to 45 ms to read a single phone number!
I have two performance problems:
1)
it is normal that a service remains stopped for two seconds ago block all program?
The service is configured as follows:
# Region Module Attributes
# StartAtBoot: true
# StartCommandReturnValue: android.app.Service.START_STICKY
# End Region
2) I need to read (in Service) all the phone numbers in the address book, however, for each phone number takes too long time!
This instruction allows me to read quickly:
ContactsList= PhoneContacts.GetAll (False, False)
still continuing,
...
Dim c As Contact
c = ContactsList.get (i)
For j = 0 To c.GetPhones.Size-1
c.GetPhones.GetKeyAt (j) 'This statement it takes you 8ms up to 45 ms to read a single phone number!