Hy
I have an gui app that load a complex window.. with a lot of information...
the basic compect is when click in a row of the grid, its loads values to a lot of componets.... but when the user start to click fest in the rows.. its show the loading window
how to imporve ?
i 'm using alreday Accuterm 8.1 with the gui apps alreday uptdade, i saw there is some itens in ACCUTERMCRTL file.. it can be used to improve the perfomace ?
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
AccuTerm does a lot of work bouncing back and forth between the GUI and the controlling basic program. That's where a lot of the time is spent. You can group them all together by using ATGUIBEGINMACRO, ATGUIENDMACRO and ATGUIRUNMACRO and do them all at once.
Instead of
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
Put the ATGUI macro functions before and after like this:
ID = 'SOME.ID'
CALL ATGUIBEGINMACRO(ID, GUIERRORS, GUISTATE)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUIENDMACRO(ID, GUIERRORS, GUISTATE)
CALL ATGUIRUNMACRO(ID, '', GUIERRORS, GUISTATE)
What it does is save all the actions into a buffer and then sends it to the GUI in one shot. It speeds things up a lot.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
AccuTerm does a lot of work bouncing back and forth between the GUI and the controlling basic program. That's where a lot of the time is spent. You can group them all together by using ATGUIBEGINMACRO, ATGUIENDMACRO and ATGUIRUNMACRO and do them all at once.
Instead of
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
Put the ATGUI macro functions before and after like this:
ID = 'SOME.ID'
CALL ATGUIBEGINMACRO(ID, GUIERRORS, GUISTATE)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUIENDMACRO(ID, GUIERRORS, GUISTATE)
CALL ATGUIRUNMACRO(ID, '', GUIERRORS, GUISTATE)
What it does is save all the actions into a buffer and then sends it to the GUI in one shot. It speeds things up a lot.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Yes .. that works when its the same data to be loading, in my case 90% of the time is "new" data, maybe when i create the screen.. i can write a code to create the macro, and when the user click run the macro
but its not the the best option.. since it has a color control that changes all the time
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Yes .. that works when its the same data to be loading, in my case 90% of the time is "new" data, maybe when i create the screen.. i can write a code to create the macro, and when the user click run the macro
but its not the the best option.. since it has a color control that changes all the time
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
It works anytime you're loading a lot of controls or changing a lot of properties. In the first example with three calls to ATGUISETPROP, the first call sends the data to the GUI client. The client refreshes the screen and then returns back to the basic program. The program calls the second ATGUISETPROP, a new set of data is sent to the GUI client and then it returns. That happens a third time. If you're updating 20 different controls on your screen you're bouncing back and forth 20 times.
Putting the BEGIN and END macro calls around them causes all the actions and data to be stored in that one macro. When you call RUNMACRO it sends all the steps to the AccuTerm GUI at once, The GIU clent processes them all and refreshes the screen. It's much much faster. If you weren't already using them, give them a try. It's really simple. ATGUIBEGINMACRO recording the steps. ATGUIENDMACRO stops recording the steps. ATGUIRUNMACRO runs everything that was recorded.
I first used it because I was highlighting individual rows on a grid. Since you can't pass the color properties for all the rows at once I had to call the ATGUISETPROP routine for each row. That was causing the loading window to pop up a lot. When I grouped all those into a macro and ran that once, it was almost instant.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
AccuTerm does a lot of work bouncing back and forth between the GUI and the controlling basic program. That's where a lot of the time is spent. You can group them all together by using ATGUIBEGINMACRO, ATGUIENDMACRO and ATGUIRUNMACRO and do them all at once.
Instead of
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
Put the ATGUI macro functions before and after like this:
ID = 'SOME.ID'
CALL ATGUIBEGINMACRO(ID, GUIERRORS, GUISTATE)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUISETPROP(GUIAPP, GUIFRM, GUICTRL, ....)
CALL ATGUIENDMACRO(ID, GUIERRORS, GUISTATE)
CALL ATGUIRUNMACRO(ID, '', GUIERRORS, GUISTATE)
What it does is save all the actions into a buffer and then sends it to the GUI in one shot. It speeds things up a lot.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hy i did the changes as you sugested...
andddd...
it worked !! now its fast agian.. i had only used the BEGINMACRO RUNMACRO to create the screen, i put now to load the objects in the screen... and now i don't have any more "loading screeens", but still takes one second to load all hahahah
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Hy i did the changes as you sugested...
andddd...
it worked !! now its fast agian.. i had only used the BEGINMACRO RUNMACRO to create the screen, i put now to load the objects in the screen... and now i don't have any more "loading screeens", but still takes one second to load all hahahah
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Great! Glad I could help.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------