Android Question Faster Looping

tamba sylvester

Member
Licensed User
Longtime User
I am looping through my contact which has 5000 contacts is there a faster way to help me loop Through.
It is not a must contact but assume records of up to 1,000,000 Records.

Any algorithm to help me in this will highly appreciate.
Loop:
For i=0 to 100000
' any faster way to loop through without making the phone freeze

Next
 

tamba sylvester

Member
Licensed User
Longtime User
The loop has no problem my worry is if we have an algorithm to assist to loop over millions of records without making the application freeze
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
MAke your sub a resumeable sub and use "wait for" for it to finish.
Use sleep in the sub to not freeze anything.
 
Upvote 0
Top