Quantcast
Viewing all articles
Browse latest Browse all 3780

Slowness of listbox.addrow() on WIndows

Observing that the WIndows version of my app took a while to load up a listbox, I did some profiling and then closer (within a method) inspection of timings, which pointed the finger at Listbox.AddRow(). So I made a simple app with this code in a button’s Pressed handler:

Var  i As Integer, clockStart, tnow, timeTaken As Double

clockStart   = System.Microseconds ()
msgArea.Text = ""
theListBox.RemoveAllRows ()

for  i = 0 to 20000
  theListBox.AddRow ()
next

tnow = System.Microseconds ()
timeTaken = (tnow - clockStart) / 1000.0
msgArea.Text = "That took " + timeTaken.ToString + " msecs"

Results:

2018 Mac Mini running Sonoma - typically 70msec.
Mint running in a VB VM in this Mini - typically 110 to 130 msec.

Win-11 running in a VB VM on this Mini - ranges from 8000 msec down to 6000 or so, which matches what I saw in my app. I won’t have access to real hardware running Win-11 for a couple of weeks but if anyone has any insight as to this major discrepancy I’d appreciate it.

For Lin/Win in the above, running remotely.

7 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3780

Trending Articles