Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > GUI Development
  New Posts New Posts RSS Feed - Concerns about Speed
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedConcerns about Speed

 Post Reply Post Reply
Author
Message
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Topic: Concerns about Speed
    Posted: August 20 2007 at 10:12pm
I have 2 areas of concern over the speed of the GUI.
 
1. I have a project that contains 20 forms and rather than build all 20 forms when the project is first opened, I extract each forms controls from the project and then call ATGUIRUNMACRO to build the required form. I have several forms that when built are 200kb+, these forms can take up to 30 seconds to load. The delay is during the ATGUIRUNMACRO. After the forms are cached they take about 5-6 seconds to load. Some might say that the initial build is only done once and the subsequent builds from cache are building at an acceptable speed. I wouldn't disagree with that accept in my case the forms can be changed depending upon security access level amendments (What I mean by that is the Master Form's controls are manipulated at build time to reflect security access restrictions resulting in many replicated but not duplicated forms.)
 
2. The lack of a type ahead buffer on text control boxes creates the impression that the whole application is very slow, especially when the operator has just upgraded from a text based system.
 
I would be interested to hear everyone's views on this subject and maybe get these issues pushed to the top of the wish list. 
KMW
Back to Top
Mike Gross View Drop Down
Beta Tester
Beta Tester


Joined: January 20 2004
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mike Gross Quote  Post ReplyReply Direct Link To This Post Posted: August 27 2007 at 5:43am
How is your GUI Application written ? Is it a SDI (Single Document)Standalone or Subroutine (Mainevent) or MDI subroutine. Are you using TABS controls in the forms ?

Back to Top
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Posted: August 27 2007 at 7:25pm
My application is MDI subroutine and yes I do use, extensively, TAB Controls. I prefer to have all related data on one open form rather than popping up each page/tab as requested, although I can see how this will improve performance but it kind of defeats the object of having tab controls.
KMW
Back to Top
Mike Gross View Drop Down
Beta Tester
Beta Tester


Joined: January 20 2004
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mike Gross Quote  Post ReplyReply Direct Link To This Post Posted: August 28 2007 at 8:18am
Calidore,

I have seen applications that use extensive TAB controls that contain a lot of other controls which seem to take a very long time to load. They run fast once thay load and are very efficient for data entry. I don't know if this is a Accuterm GUI issue or a Windows overhead issue. I know Windows itself uses extensive TAB controls to choose settings ect. but none are of any great size like we find in applications. I guess at some point there is a trade off on how many other controls can be in a TAB control.

Mike
Back to Top
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Posted: August 28 2007 at 7:57pm

I've seen other windows applications with a similar number of controls and they load instantaneously. 

I don't know how Accuterm handles the build of the form but would it be possible for the major work to be done by the client rather than the server. If you watch the task manager whilst a form is being built you'll see that there is almost no activity until the form starts being painted on the screen, indicating the delay is at the server end.
 
Also, without wanting to bang on about it, the type ahead buffer remains a frustrating restriction on the users.
 
One last thing, I'm perplexed at the lack of input from other forum members on this issue as it will almost certainly affect all of you at some time or other. Apparantly it appears that getting a .wav file to play is more important than getting the application to run at an optimum speed level!
KMW
Back to Top
Jeanette View Drop Down
Beta Tester
Beta Tester


Joined: August 05 2004
Location: United States
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jeanette Quote  Post ReplyReply Direct Link To This Post Posted: August 28 2007 at 11:52pm
I have a very large application using tabs. What i do is load it in memory at the application init stage. Then when the users use it, it loads very quickly!

Jeanette
www.mindsview.com
Back to Top
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Posted: August 29 2007 at 12:47am
Hi Jeanette
 
It sounds like you've shifted the bottleneck to a different place,  which is a work around rather than a solution.
 
My applications have many complex forms and it isn't feasible to load them all into memory at an initial load process plus the fact that you will inevitable hit a memory problem at some point.
 
Building simpler forms and popping them up as required would seem to be the only other work around, which is not very elegant and imposes further unwanted restrictions on development.
 
I would like to think that there is a real solution to the problem sometime in the near future.
KMW
Back to Top
peterh View Drop Down
Beta Tester
Beta Tester


Joined: July 21 2004
Location: United States
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote peterh Quote  Post ReplyReply Direct Link To This Post Posted: August 29 2007 at 1:41am
Hi all,
I have dealt with this issue by creating my own cache - I do not use Accuterm's code generator - I have my own forms driver.

I allow up to 5 instances of any one form and keep track of whats loaded and whats not in common. Once a form is loaded when the user is done I hide the form rather than close it. At load time, I first check to see if the form is in my cache, if so, I just load the controls with the new data and show it. So far, no memory issues have arisen. If/when they do, I figure I can add logic to close out 'oldest' forms first.

I also don't load all the controls on all the tabs at once - on initial display I only load the controls on the first tab with the data. If they click on anther tab, I load the data into its controls, and so on.

I still get the initial 10 second load lag (my forms must not be as large as Calidor's), but it only happens once for the user per form per session. On subsequent calling of the program, the form comes up within seconds.
Peter Holmes
Back to Top
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Posted: August 29 2007 at 2:58am
Hi Peter
 
I also do not use the Accuterm code generator and handle forms in exactly the same way as your describe including hiding previously opened forms and only loading tab data when the tab is clicked which all works fine.
 
But it would be nice to not have to constantly explain away to the user the reason why initially the form load is so slow and hear them complain that 'It's really slow and not as fast as our old system'!!
 
KMW
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: August 29 2007 at 5:33am
The discussion about the typeahead problem has been moved to a separate thread.
Back to Top
jtillia View Drop Down
Beta Tester
Beta Tester


Joined: August 03 2004
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote jtillia Quote  Post ReplyReply Direct Link To This Post Posted: August 30 2007 at 5:15am
Speed is very important to us. We are battling the same issues as are shown in this thread.

Our template file has more than 1200 items and we use the MDI approach. So our application is very large.

We don't have a good answer yet on cache or anything else. We are in the middle of several implementations right now, so we have not had the time to post to this forum as we would like.

Hopefully, we'll all be back at the office next week and we will summarize our input.
Back to Top
mikkane View Drop Down
Newbie
Newbie


Joined: June 12 2007
Location: United Kingdom
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikkane Quote  Post ReplyReply Direct Link To This Post Posted: September 04 2007 at 11:16pm
I also am experiencing the same issue as described above.  Our application is still in development, and is not yet live.  A number of our screens are taking 10+ seconds to load, and although it is concerning, it's something that I thought could be optimised later.

I shall watch this thread with interest, hopefully there is a solution to be found.
Mark
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: September 05 2007 at 5:16am
Hi All -

I am posting this message so that we all understand how the GUI runtime actually works.

Basically, the application program on the host creates a command record, which is structured as a dynamic array, using the ATGUI... subroutines. This record is sent to AccuTerm using a normal BASIC PRINT statement. AccuTerm uses COM (OLE) to forward the command record to the GUI runtime process (ATGUISVR.EXE), which processes the record and executes the commands. Responses from the commands are packaged into a response record (also a dynamic array), which is sent back to AccuTerm and transmitted to the host. The retrieves the results using normal BASIC INPUT statements.

The GUI runtime process creates application, form and control objects in response to commands from the application. The GUI objects are implemented in VB as a private Class that wraps a real VB6 form or control. The forms are generic, containing a hidden instance of each kind of control that is available to the GUI application. New instances of these controls are created and destroyed on the fly using a VB6 control array.

When you use a macro or template created by the GUI designer, the command record contains instructions to create all of the objects contained in the macro or template, and assign initial values for properties. ATGUIRUNMACRO sends the command record to the runtime, and returns the results. If the macro ID argument to ATGUIBEGINMACRO is not null, the ID is used as a cache ID for storing the macro on the local PC. ATGUIBEGINMACRO adds a time-date stamp to the macro for managing the cache (the GUI designer does the same thing for templates). When you call ATGUIRUNMACRO with a macro that has an ID, the command record initially only contains the ID and time-date stamp. When the runtime processes this record, it attempts to read the macro from the local cache on the PC and if the time-date stamp matches, it proceeds to execute the commands read from the cache. Otherwise it returns a failure status, and ATGUIRUNMACRO sends the entire macro. The runtime then updates the local cache and executes the commands.

The use of the cache reduces the amount of network traffic and the size of the message that is passed between Windows processes on the PC. However, only the commands to create and initialize the GUI objects are stored in the cache. The objects themselves are re-created when the cached commands are processed.

I believe that in the case of very large macros, the delay everyone is noticing is due to the (re-)creation of the GUI objects. I think fundamentally, this is a limitation of the implementation of the GUI runtime in VB6. At the present time there is not much that can be done about this.

However, in the future, we are looking at other environments for implementing the GUI runtime. If anyone was at the last Spectrum show, you might have noticed a simple GUI program running in FireFox in Linux. This was accomplished using a rudimentary implementation of the GUI runtime in Flex (Flash). So at least in concept, it is feasible to implement the runtime in other languages / environemnts. We are also exploring a C++ implementation.

So, for now, I think all that can be done is to use clever tricks to maximize the use of the cache mechanism, and manage the creation and deletion of forms, so that you only create forms as needed and do not delete them if they might be used again. In this case, you must be careful not to leave "too many" objects loaded, to keep from running out of memory on the PC. I'm not sure what the correct number is for "too many", but there is another thread on this forum with some thoughts about this.

In case anyone feels adventurous, try installing the debugging version of AccuTerm, and run asdebuglog.exe to trace the GUI server engine. There are several trace options you can select for atguisvr - please experiment.

I hope this helps with understanding the inner workings of the environment.

Thanks,

Pete
Back to Top
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Posted: September 06 2007 at 12:28am

Hi Pete

Am I right in thinking that ATGUISVR.EXE on the client builds the VB6 form from the control objects that have been passed to it from the server?
 
If this is the case then the ATGUISVR.EXE bit isn't the bottleneck. This process executes extremely fast. The delay occurs when the form controls are being passed from the server to the client. I may be over simplyfying this but is there no way to increase this throughput?
 
KMW
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: September 06 2007 at 3:39am
Hi Calidore -

One way to confirm this is to use the built-in cache. If the cache is valid, then the host only sends the macro ID and time-date stamp, probably less than 100 bytes. Run the application two times, timing the 2nd run, which should use the cache. Then delete all the files in the c:\program files\atwin\tmpcache and run the application again. Since the cache is now empty, the entire form definition will be sent from the host. This should give a fair approximation of the time required for sending the complete macro accross the wire (and from the AccuTerm process to the ATGUISVR.EXE process). The time measured in the 2nd case will also include an extra round-trip transaction with small messages. To validate the cache, ATGUIRUNMACRO will send only the ID and time-date stamp first, then it will get a response indicating that the cache is invalid, after which it will send the complete macro.

Thanks,

Pete
Back to Top
CALIDORE View Drop Down
Beta Tester
Beta Tester


Joined: May 10 2004
Location: United States
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote CALIDORE Quote  Post ReplyReply Direct Link To This Post Posted: September 06 2007 at 3:55am
Hi Pete
 
Sorry Pete what I was trying to say was, is there a way to speed up the transfer of the form to the client when the cache is empty. When cached the form loading performance is fine, it's the initial delay when the form is not cached that is the real cause of the slowness.
 
KMW
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.