473,394 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Application takes a long time to open a dialog after some time

I noticed this behavior in a C# application. For its nature the
applications stays mainly minimized to the tray icons
As soon as it's launched the application responds normally. After a
while, when I double click on the tray icon to show the window or I
type a shortcut to open a new dialog (which also contains third-part
controls) it takes much longer to open (even 3-5 seconds).

How is that? Is there a way to avoid this behavior and keep the
application always prompt.

Thanks.
Andrea
Mar 18 '07 #1
10 2162
na***@community.nospam <na***@community.nospamwrote:
I noticed this behavior in a C# application. For its nature the
applications stays mainly minimized to the tray icons
As soon as it's launched the application responds normally. After a
while, when I double click on the tray icon to show the window or I
type a shortcut to open a new dialog (which also contains third-part
controls) it takes much longer to open (even 3-5 seconds).

How is that? Is there a way to avoid this behavior and keep the
application always prompt.
How long is "a while"? If you're talking an hour or so when the
application hasn't been used, it's probably been swapped to disk. I
don't know any way round that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 18 '07 #2
On Sun, 18 Mar 2007 17:56:48 +0800, Jon Skeet [C# MVP] <sk***@pobox.com>
wrote:
How long is "a while"? If you're talking an hour or so when the
application hasn't been used, it's probably been swapped to disk. I
don't know any way round that.
Well, there are ways to keep the application in physical memory, but it's
not wise to do so in most situations. :)
Mar 18 '07 #3
VJ
Just put up a display message or notification like Outlook does ( idea is
from Outlook, but I guess its different issue).. We have done that to
indicate saying App is trying to load again, or a message indicate that...
VJ

<na***@community.nospamwrote in message
news:8k********************************@4ax.com...
>I noticed this behavior in a C# application. For its nature the
applications stays mainly minimized to the tray icons
As soon as it's launched the application responds normally. After a
while, when I double click on the tray icon to show the window or I
type a shortcut to open a new dialog (which also contains third-part
controls) it takes much longer to open (even 3-5 seconds).

How is that? Is there a way to avoid this behavior and keep the
application always prompt.

Thanks.
Andrea

Mar 18 '07 #4
But is the delay a problem of .NET or Windows application in general?
Maybe some assemblies gets unloaded and then reloaded again. Are there
any situations which may increase this delay?
Thanks.
Andrea

On Sun, 18 Mar 2007 10:11:33 -0500, "VJ" <no***********@yahoo.com>
wrote:
>Just put up a display message or notification like Outlook does ( idea is
from Outlook, but I guess its different issue).. We have done that to
indicate saying App is trying to load again, or a message indicate that...
VJ
Mar 18 '07 #5
VJ
Is it slow after how long, like Peter / Jon said. If its longer than 1 hour
than it goes to disk.

Yours is more like application goes to disk probably, and you need to
maintain in physical memory. Please don't do that, not a good idea. Best
would be to display a message and let the windows take care of it.

Also in the case if you have expensive operation on Application load, when
it goes to disk, coming out back will be slow.

VJ
<na***@community.nospamwrote in message
news:rr********************************@4ax.com...
But is the delay a problem of .NET or Windows application in general?
Maybe some assemblies gets unloaded and then reloaded again. Are there
any situations which may increase this delay?
Thanks.
Andrea

On Sun, 18 Mar 2007 10:11:33 -0500, "VJ" <no***********@yahoo.com>
wrote:
>>Just put up a display message or notification like Outlook does ( idea is
from Outlook, but I guess its different issue).. We have done that to
indicate saying App is trying to load again, or a message indicate that...
VJ

Mar 18 '07 #6
VJ <no***********@yahoo.comwrote:

<snip>
Also in the case if you have expensive operation on Application load, when
it goes to disk, coming out back will be slow.
No, because the application isn't actually *loading* again - it's just
bringing its virtual memory back from the swap file into physical
memory. The application isn't restarting.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 18 '07 #7
na***@community.nospam <na***@community.nospamwrote:
But is the delay a problem of .NET or Windows application in general?
It's neither .NET nor Windows specific. I always find when I return to
Eclipse (Windows or Linux) or VS.NET after lunch, they take quite a
while to become fully responsive again.
Maybe some assemblies gets unloaded and then reloaded again.
No, that shouldn't be it.
Are there any situations which may increase this delay?
I don't know exactly how Windows decides when to swap things, but I
suspect that the more applications that are running and the less
physical memory the machine has, the more likely Windows is to swap out
the idle app.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 18 '07 #8
Hi Andrea,

Thanks for your feedback.

With the current information available, it is hard to determine if this
delay is caused by the Windows Virtual Memory swap from disk or .Net
FCL/CLR code. I would recommend you to follow the steps in the blog entry
below to obtain a stack trace of the delay(delay troubleshooting steps are
similar to the hang issue), I assume the stack trace may reveal some
internal information(I wrote this blog entry for our team):
"How to debug application crash/hang in production environment?"
http://blogs.msdn.com/msdnts/archive...pplication-cra
sh-hang-in-production-environment.aspx

Note: in this scenario, it may be helpful to use Process Explorer to obtain
the stack trace, because the Process Explorer can provide the kernel-mode
stack trace of certain thread.

I will wait for your further information, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 19 '07 #9
<na***@community.nospamwrote in message news:8k********************************@4ax.com...
>I noticed this behavior in a C# application. For its nature the
applications stays mainly minimized to the tray icons
As soon as it's launched the application responds normally. After a
while, when I double click on the tray icon to show the window or I
type a shortcut to open a new dialog (which also contains third-part
controls) it takes much longer to open (even 3-5 seconds).

How is that? Is there a way to avoid this behavior and keep the
application always prompt.

Thanks.
Andrea

Minimized applications and tray Icons, have their "inactive" pages automatically swapped
out to the paging file. In general, it's only a matter of milliseconds to bring these pages
back-in, but if it takes seconds it's an indication that the working set is large and/or
there is a severe lack of physical memory.
This means that other application's pages will have to be swapped-out in order to bring back
your 'tray' application's pages back into the working set.
You can verify this action by watching the memory counters and especially the "working set"
counter of your application using perfmon.exe.

Willy.

Mar 19 '07 #10
Hi Andrea,

Have you reviewed my last reply to you? Does it make sense to you? If you
still need any help or have any concern, please feel free to feedback,
thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 23 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel | last post by:
loading web application project suddonly takes 5 mintues and says "Contacting server to open Web project.." wile it takes 5 minutes to load. how to fix? i tried reregistering asp.net and iisreset....
0
by: Lady_A | last post by:
Hi, I have an XP SP2, .net framework 1.1 SP1. An html/css interface using jscripts in which I create ActiveX objects and present a dialog using the appropriate language set by the user on that...
4
by: Alexander | last post by:
Hi, I have written a program that takes on some operations much more time than I expected. As I have seen users clicking wildly on the screen to make something happen, I want to follow the...
6
by: B B | last post by:
Okay, here is what's happening: I have a reasonably fast laptop (1.4 GHz Mobile M, so comparable to 2.5GHz P4) doing .net development. Running Windows XP pro, SP2 IIS is installed and running...
7
by: Bobby C. | last post by:
My company is in the process of getting ready (well actually QTR 2 2004) to roll out a rewritten version of a vertical market application for the municipal market (small and medium sized cities). ...
6
by: QuenHo | last post by:
Hi All, I've build a winform application with vb.net which accepts command-line parameters. If I tell windows to open certain files with this application all works fine, but windows does NOT...
4
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a...
10
by: rich | last post by:
I have a PHP5 application that accepts external messages, and inserts them into a database. It's rather high traffic.. the server could be receiving thousands at a time, and recently mysql has...
4
by: mdmdmd | last post by:
Hello, I wish to collect 4 files from a user. So I have decided to use tkFileDialog askopenfilename. My problem is that after a few file selections the root window is destroyed (the whole...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.