Click here to Skip to main content
15,883,623 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

A simple question to ask-
Why does a pop up window take more time to open when it is opened for the first time than the same pop up opened for the second time.
Can you tell me what causes this and how can we fix it.
Posted
Comments
Praveen Kumar Upadhyay 8-Jan-15 1:28am    
Show you code first. We can not judge directly. Generally this doesn't happen, if happening then there might be something in your code which is making it load slow.
Oshtri Deka 8-Jan-15 3:51am    
Is it ASP.Net or Windows application?
Member 11360278 8-Jan-15 4:15am    
windows application
Arjsrya 8-Jan-15 4:16am    
Could you share the code?
Richard MacCutchan 8-Jan-15 5:34am    
There is nothing to fix. The first time you load a popup it has to be constructed in memory and then displayed. When it is unloaded it will often remain cached in memory and can be loaded faster on subsequent calls.

1 solution

I am pretty much sure that this would be the WPF framework, where the pop ups and other execution that require to build a GUI require some time for their first execution and then, the process is cached so the second time it doesn't take up much time for the GUI to build and show up.

Not only the GUIs, Windows but other controls such as Buttons also show the same behaviour. If you click on them for the first time, the GUI takes a while to come back into action, whereas for the second time it doesn't much time.

So, the conclusion is that there is no problem with your code or the Window itself. For the first time, the code has to be pushed in the memory for execution, and for the second time the code is already available so it takes less time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900