Faster Boolean In PowerBuilder
Because PowerBuilder Is an interpreted language Then the size Of your scripts can have an effect On your overall System speed. By reducing an objects size By 10% your Object will load 10% faster, Run 10% faster And use 10% less memory. This Next tip Is something I use To help maximize every Last drop Of performance From PB when doing Boolean assignment.
You can Save Space And slightly reduce execution Time as well as Object load times By Using This simple technique.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
//example 1: If a = b Then cbx_1.Checked = True Else cbx_1.Checked = False End If //Fast Code: cbx_1.Checked = a = b //example 2: Boolean lb_Bool If dw_1.GetItemString( 1, "columname" ) = "AND" Then lb_Bool = True Else lb_Bool = False End If //Fast Code: lb_Bool = dw_1.GetItemString( 1, "columname" ) = "AND" |
Good Luck!
Subscribe
Login
0 Comments
Oldest