First step is to measure it
It is not slow even in debug because we are only talking about a table with a total of 225 flags. But I am questioning this query to be done for every visible ID:
cursor1=Starter.SQL1.ExecQuery("SELECT FLAG FROM " & Starter.DBTableName & " WHERE ID =" & row.Get("ID"))
Is there a way to store the ID and Blob in a map when first run for all items, then use the map to extract the blob ( as a value) using the ID as the key or a list or something. This way I can just retrieve the bytes of the blob (map value) based on the ID ( map key)
in the B4XTable1_DataUpdated sub. If you think what I currently have is OK, I can live with that. It just does not look kosher.