Hi,
I am new to uniface tech. I came across a performance issue in a uniface screen which has Select All button which when clicked by user it will color all the records with grey color to indicate they are selected (just like excel) but it takes more that 5mins to color all the records (10,000 records) with each record having 12 fields. Below is code snippet request you to suggest how performance can be improved.
l_curocc = $curocc (entity_nm)
l_totdbocc = $totocc(entity_nm)
l_tot_flds = $itemcount(l_fieldnames)
setocc "entity_nm", 1
repeat
l_cnt = 1
while (l_cnt <= l_tot_flds)
getitem(l_fieldname, l_fieldnames, l_cnt)
scan l_fieldname, "PBTN"
if ($result <= 0)
l_frac = $frac ($curocc(l_entity) / 2)
if (l_frac = 0)
$fieldproperties (l_fieldname) = "BackColor=%%l_rowselectdark"
l_color = l_rowselectdark
else
$fieldproperties (l_fieldname) = "BackColor=%%l_rowselectlight"
l_color = l_rowselectlight
endif
endif
l_cnt = l_cnt + 1
endwhile if (l_curocc < l_totdbocc)
setocc "entity_nm", $curocc (entity_nm) + 1
endif;
until ($status < 0 | l_curocc >= l_totdbocc)
setocc "entity_nm", l_curocc
Thanks,
Imran.




