Application takes time to load after a period Inactivity

R

ramadu

Hi,

I am a developer in a company which makes a large scale .net windows
application. Recently, my users have been complaining that after a
period of inactivity of about 15-20 minutes, the next action that they
perform takes 30+ seconds to execute. The same action normally would be
done in around 5 seconds.

The application consists of multiple dlls (data access layer, system
functions, UI layer etc.) and consumes on an average around 10-15 MB of
memory and peaks to about 40-50 MB during complex processing. I'll be
happy to provide more information if required.

What can I do to address this issue? Thanks in advance.

- ramadu
 
L

Linda Liu [MSFT]

Hi Ramadu,

Thank you for posting.

Do the other programs on your machine become slower too after a period of
inactivity? If it is, the problem may be related to your machine.

Would you tell me what's the action that will be slower after a period of
inactivity? For example, clicking on a button or something else. I think
you may check what on earth happens behind the action.

I am looking forward to your response.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
R

ramadu

Hi Linda,

This issue was reported by my client but I've noticed the same on my
machine also. So we can rule out a problem related to just my machine.

The action performed is usually a mouse click on a menu item which will
load a data grid. Though the number of items on grid is usually in the
thousands, it usually just takes around 5-6 seconds to load. Only when
the application is dormant for atleast 1/2 hour does it take some time
to load.

I'm wondering if this issue is because of operating system paging. I
tried to put in a timer in the application which in regular intervals
performs a dummy read on the database, but this does not seem to help.

A final note. I've noticied this issue with other applications also
(browsers, IDEs, mail programs etc.) not just on my machine but several
machines (running Windows XP) where it just takes time to load after
selecting it on the task bar after not using it for a while. So can
this be just a Windows issue?

- ramadu
 
L

Linda Liu [MSFT]

Hi Ramadu,

Thank you for your response.

You have said that the action performed is usually a mouse click on a menu
item which will load a data grid. I think the problem may be related to the
datasource. I don't know what kind of datasource you are using, for example
files in your machine or database on the network. If the datasource is
files in your machine, perhaps it is the system that clears the cache in
the period of dormant and this will result in a slow action later. If the
datasource is a database, you may have a try debugging into the code step
by step to see which sentences are executed more slowly. I think this could
narrow down the problem existence area.

Hope this is helpful to you.

If you have any other concern or need anything else, please don't hesitate
to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
R

ramadu

Hi Linda,

The datasource is a SQL Server database. What I don't get is that that
the same datasource takes less than 5 seconds normally and after the
application is dormant takes 30+ seconds. Why can this be?

I am still going to put debug points and see which steps take time as
you suggested.

Thanks for all your help!
 
A

Andy

Is it possible that the inactivity is giving enough time for the
connection pooled connections to close?'

Is your app being swapped out of main memory?
 
C

Chris Dunaway

One other area to look at is whether or not the hard disks are asleep
and they have to spin back up?

If you go into the Screen Saver tab and click on the Power settings,
there is a setting to turn off the hard disk after a period of
inactivity. Perhaps this is worth a shot.
 
R

ramadu

I called up Microsoft Tech Support and they put me in touch with one of
their support engineers. What he asked me to do was to disable all the
3rd party windows services running on my machine (using msconfig),
restart the machine and re-run the application.

This time the application response time was < 5 seconds even after the
machine was dormant for more than 30 minutes! This looks to be the
major cause of the issue. I'm also looking to find out if the
application is being swapped out of memory and whether my sql database
connections take time to reopen (like andy suggested).

Any ideas on how to figure out if you application is swapped to the HD?

I'm also trying to pinpoint to the exact service which is causing the
problem. Will keep you posted. In the meanwhile if there are any other
ideas I'm still open to suggestions.

Thanks a lot!

- ramadu
 
C

Charles Law

Hi Ramadu

Nothing to add really, except that I get the same problem, so I am following
this thread with interest.

I have often wondered if it has anything to do with Norton Antivirus. I
notice that it takes an absolute age to load at start-up, along with
Zonealarm. When I look at the list of processes running after start-up, it
comes to about 50. Almost certainly too many.

If I think of anything I will chip in.

Charles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top