Bug? WebView. Initialize is slow on first use

Russ J

I am observing that the first call to WebView.Initialize is taking about 3500 ticks. Subsequent calls take about 15 ticks. I am creating webviews dynamically; they are not bound to any views in a layout. If this is normal behavior, I couldn't find that documented anywhere and I don't recall this behavior a couple months ago when I was working on the same project.

This behavior is observed in BA version 10.6 with Android 9. Same behavior in both debug and release. I'm using USB connection to Samsung Galaxy Tab. The tablet software is factory fresh except for latest updates from Google.

I can reproduce this with a brand new project with just this minimal code:

Sub Button1_Click
    Dim w1 As WebView
    Dim i As Long = DateTime.Now
    w1.Initialize("test1")  'This line is taking approximately 3500 ticks in both debug and release mode  - Android version 9
    ToastMessageShow(DateTime.Now - i, False)
    Dim w2 As WebView
    i  = DateTime.Now
    w2.Initialize("test2")  'This line is taking aobut 15 ticks
    ToastMessageShow(DateTime.Now - i, True)
End Sub