Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,060 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,585 people online right now. Registration is fast and FREE... Join Now!




C# App Runs Extremely Slow

 
Reply to this topicStart new topic

C# App Runs Extremely Slow, Visual C# EE Published WinForm App

Jordan CB
18 Apr, 2008 - 12:17 PM
Post #1

New D.I.C Head
*

Joined: 16 Apr, 2008
Posts: 15

Howdy,

I have a question about published apps through Visual C# EE. Anyone have any problems with after publishing an item to a local web server, then hitting the webserver.. installing the application, then running it causes the program to take about 10 seconds to load up. Then it has a 5 second delay between 'catch-ups'. Any ideas what might be causing this application to run so slow? (it is hitting a remote Database server for queries, but when running the app on the dev machine (not the DB server), it runs flawlessly)

Didn't know if there is any config files that I might be screwing up or anything, but I can't figure out for the life of me why it is running slow as molasses. Any help is appreciated.. Thanks!
User is offlineProfile CardPM
+Quote Post

girasquid
RE: C# App Runs Extremely Slow
18 Apr, 2008 - 12:46 PM
Post #2

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,266



Thanked: 14 times
Dream Kudos: 650
My Contributions
If it's hitting a remote database for its queries and it's suddenly on the same server as the database, could that be the problem? It might be trying to go out into the world, and then back into itself - which would probably slow it down as compared to knowing that it just needs to connect to itself.
User is offlineProfile CardPM
+Quote Post

Jordan CB
RE: C# App Runs Extremely Slow
18 Apr, 2008 - 12:56 PM
Post #3

New D.I.C Head
*

Joined: 16 Apr, 2008
Posts: 15

QUOTE(girasquid @ 18 Apr, 2008 - 01:46 PM) *

If it's hitting a remote database for its queries and it's suddenly on the same server as the database, could that be the problem? It might be trying to go out into the world, and then back into itself - which would probably slow it down as compared to knowing that it just needs to connect to itself.


Thanks for the reply!

The way I have been testing it, which brought about this problem, Is that I am running a Linux MySQL DB Server, then I have another machine that is my web server. The app is being installed and ran on a workstation computer. So I guess I explained my situation wrong, unless I'm not getting what your saying by "same server as the database". They are all different machines..

The app acts like it is just lagging a ton.. my development network is just a 10/100 line between the servers and workstation. I don't think that it would be bogging down because of the LAN, but I've been wrong before ( just once ). I don't know what the heck the problem is. It runs fine when ran off of the webserver... but any workstation it goes slow. Any other ideas? Thanks a bunch for your reply though girasquid. I appreciate any help!

Thanks!

-- Jordan
User is offlineProfile CardPM
+Quote Post

skaoth
RE: C# App Runs Extremely Slow
18 Apr, 2008 - 03:35 PM
Post #4

D.I.C Regular
Group Icon

Joined: 7 Nov, 2007
Posts: 342



Thanked: 10 times
Dream Kudos: 100
My Contributions
So let me get this straight.

Your application is a web app correct?
You have
1) Linux MySQL server (machine 1)
2) Workstation for developing on (machine 2) - Everything seems to work correct locally right?
3) Webserver - Used to deploy your web app to

is this correct? I assume this is a private network?

What your saying is that you get a slow down when accessing your application on the webserver just after you published code to it?

Does the delay continue with multiple requests?
Generally there is an initial delay with the first request to a asp.net web app after publishing it because the code needs to be compiled on the webserver. The slow down should disappear after that
User is offlineProfile CardPM
+Quote Post

Jordan CB
RE: C# App Runs Extremely Slow
19 Apr, 2008 - 09:49 AM
Post #5

New D.I.C Head
*

Joined: 16 Apr, 2008
Posts: 15

skaoth,

Yes you are correct in your description of what i'm doing. I am going to try it at my home network with my big server to see if it makes any difference. I let the app run for about 30 minutes and it still was delayed horribly. I don't know what the heck i've done or what I'm missing. I think i'll just try running a few simple apps to see if it is something within my code or something with the server/app communication.

Thanks for your info on compiling time.

-- Jordan
User is offlineProfile CardPM
+Quote Post

Jordan CB
RE: C# App Runs Extremely Slow
21 Apr, 2008 - 10:01 AM
Post #6

New D.I.C Head
*

Joined: 16 Apr, 2008
Posts: 15

Hey,

Think I figured out my problem, thought I would share.

I took my original app and took out two timers I have in place that 'tick' every second to queue the database for online users and for a system clock. Once I took those out , the app runs like normal except whenever I do anything that queries the database. It will take about 1-2 seconds (at least a noticeable gap) from Event Fire to results. So I guess it is just a delay between database server and application on the workstation. Could this be the database server or just the network in place? Wouldn't think it would be that slow. But what do I know.

If anyone has any other comments, feel free to post! I appreciate all who commented, thanks a ton.

-- Jordan

Edit: My development machine queries the database at an average of 0.01 - 0.02 seconds whereas the workstation machine queries at 1.67 - 1.9 secs . Could this be the physical limitations of the workstation computer? It is about 1-2 years old, but decent enough to populate a result set in less than a second I would think.

This post has been edited by Jordan CB: 21 Apr, 2008 - 10:07 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 06:27PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month