打开弹出窗口为什么第一次打开时需要更多时间。 [英] Why opening a pop up window takes more time when opened for the first time.

查看:79
本文介绍了打开弹出窗口为什么第一次打开时需要更多时间。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





一个简单的问题 -

为什么弹出窗口打开时需要更多时间打开这是第一次打开第二次同样的弹出窗口。

你能告诉我是什么原因造成的,我们该如何解决。

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.

推荐答案

我非常确定这将是WPF框架,其中需要构建GUI的弹出窗口和其他执行需要一些时间才能首次执行,然后,进程被缓存,因此第二次执行花费很多时间来构建和显示GUI。



不仅GUI,Windows而且其他控件(如按钮)也显示相同的行为。如果您是第一次单击它们,GUI需要一段时间才能恢复运行,而第二次它没有太多时间。



因此,结论是您的代码或Window本身没有问题。第一次,必须将代码推送到内存中以便执行,并且第二次代码已经可用,因此花费的时间更少。
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.


这篇关于打开弹出窗口为什么第一次打开时需要更多时间。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆