iOS Question Too much time taking to load list item

gjoisa

Active Member
Licensed User
Longtime User
This code works without any problem in android . But in b4i it is taking more than a minute . where am I wrong ? I am using B4XDialog and B4XSearchTemplate to load city list . When user selects item from search template , I have to get Latitude , Longitude and Timezone from a list which contains 13138 records .

B4X:
Private Sub btnPlace_Click
    Dim diaObject As Object = Dia.ShowTemplate(SeT,"O K","","Cancel")
    Sleep(100)

    Wait For (diaObject) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        Dim n As Long = DateTime.Now
        Dim s As String = SeT.SelectedItem
        For i = 0 To fcList.Size - 1
            Dim svs() As String = Regex.Split(",",fcList.Get(i))
            If svs(0) = s Then
                CityLatLon = fcList.Get(i)
            End If
        Next
    End If
    Dim et As Long = DateTime.Now
    Dim tit As String = DateTime.GetSecond(et -n)
    Log(tit)
    Log(CityLatLon)
End Sub
 

gjoisa

Active Member
Licensed User
Longtime User
In release mode it works . Debug mode , it takes more than a minute . Any workaround ?
 
Upvote 0
Top