Remote Subnet Application Speed


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Good morning,



I am targeting the application startup to try to speed things up in our remote location. All databases are in location A. Location B is connected by a dedicated T1 (1.5Mbs) line. I have worked on many data queries to speed up certain windows within the application, now it is time to look at the startup. It takes 3-5 seconds for the application to open in location A. In location B, the app takes 30 seconds or more. What can I do...what can I look at...to increase the speed of the opening main window?



Thanks!

Bill
Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Have you figured out what is taking the time? I.e. have you done any profiling? Once we know the answer to that question, then we could likely offer more focused suggestions.
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
I wish I knew what was taking the extra 30 seconds. I am stumped. What do you mean by "profiling"?



I have combed the code both in the program.cs and the initial form that fires up. I do not see anything that stands out. The only thing that I have left to me is to start whacking at the current code...remove all suspected intensive operations, then add them back in one at a time to see which is the culprit. I really do not want to do that because that would involve a lot of updates to currently published applications. It is currently impossible for me to test this application in a controlled environment (one that mimics the two subnets connected by a T1).



If there is anything that I could check in regard to the framework, please let me know. Perhaps a three second startup is to be expected. In light of that, a 30 second startup at the other end might be exactly right. Any insight into the startup plumbing would be appreciated.



Thanks.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Bill.

Bill Cunnien (06/10/2010)
I wish I knew what was taking the extra 30 seconds. I am stumped. What do you mean by "profiling"?

Have a look at this:

http://www.red-gate.com/products/ants_performance_profiler/features.htm

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Nice utility, but it doesn't look like it would work in a run-time environment at a remote location.



I'll just start whacking and hacking. Thanks, anyway.
Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Bill Cunnien (06/10/2010)
If there is anything that I could check in regard to the framework, please let me know. Perhaps a three second startup is to be expected. In light of that, a 30 second startup at the other end might be exactly right. Any insight into the startup plumbing would be appreciated.




Hi Bill,



Just to clarify, the programs are installed on each workstations, right?



If so, are you using SF security?



Are you using a main form? if so, does this make some sort of database connection or checking before finishing loading?

Edhy Rijo

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
This is a winforms app and I am using RBS. The main form does have a few security checks going on (which is what I will whack and hack first), but I do not have any other DB activity. The security checks are used to determine what the user sees on the main form.
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
If a check for a specific permission is called like this...



cmdCoolButton.Enabled = (SecurityBasics.CurrentUser.GetPermission("Corporate").Action == PermissionAction.Grant);



...does the CurrentUser (ISecurity) object have it's permissions cached, or does the GetPermission run off to the server each time to perform a check?



It would be nice if they were cached locally. It would speed things up and limit the calls to the DB. The tradeoff is that a user would have to logoff then back on to obtain any new changes to the security profile. The tradeoff might be worth it.
Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
I am not sure if the permissions are cached, my guess is that they are not.



Another idea is use a splash form which will do all the settings in the background letting the user know what is going on, then show up the main form when done. Trent posted a very easy to implement sample of such Splash Form in the forum a while ago, that sample project may give you some ideas to implement in your project.



Also using background process object in some key process speed up a lot of things, so if you have some sort of calculation process that you do before loading the main form, a background process can help you in that regard.



Please keep us posted.

Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
From the help:

"When a user logs into the system, a flat list of his/her permissions is compiled according to the permissions assigned to the user through his/her assigned roles and directly assigned permissions."

If you have a look at the RBS source code, you will see that GetPermission will try to get the value from a Dictionary added with the user's permissions. This is initialized when the user is Authenticated. So, there won't be a trip to the server when GetPermission is used.

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Thanks for looking that up...I tried going through the source code, but did not see that it was accessing a dictionary entry. That's good.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Bill,



Here's a good post from StackOverflow that might help out.



http://stackoverflow.com/questions/1489151/method-profiling-using-attributes
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I just posted a sample profiler:



http://forum.strataframe.net/FindPost27390.aspx



The PostSharp looked very cool, but it was fun to geek out on this a bit. BigGrin
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 14 Years Ago
Ivan George Borges - 14 Years Ago
Bill Cunnien - 14 Years Ago
Greg McGuffey - 14 Years Ago
Bill Cunnien - 14 Years Ago
                         Hi Bill. [quote][b]Bill Cunnien (06/10/2010)[/b][hr]I wish I knew...
Ivan George Borges - 14 Years Ago
                             Nice utility, but it doesn't look like it would work in a run-time...
Bill Cunnien - 14 Years Ago
                         [quote][b]Bill Cunnien (06/10/2010)[/b][hr]If there is anything that I...
Edhy Rijo - 14 Years Ago
                             This is a winforms app and I am using RBS. The main form does have a...
Bill Cunnien - 14 Years Ago
                                 If a check for a specific permission is called like this...
...
Bill Cunnien - 14 Years Ago
                                     I am not sure if the permissions are cached, my guess is that they are...
Edhy Rijo - 14 Years Ago
                                     From the help: "When a user logs into the system, a flat list of...
Ivan George Borges - 14 Years Ago
                                         Thanks for looking that up...I tried going through the source code,...
Bill Cunnien - 14 Years Ago
                                             Bill,

Here's a good post from StackOverflow that might help...
Greg McGuffey - 14 Years Ago
                                                 I just posted a sample profiler:
...
Greg McGuffey - 14 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search