可执行应用程序需要很长时间才能启动 [英] Executable app takes too much time for start up

查看:101
本文介绍了可执行应用程序需要很长时间才能启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建发布项目时,当我双击编译项目的.exe文件时,它花了大约2分钟打开,我的项目只有173Kb大小。我用ANTS PERFORMENCE检查.exe,它说需要很多时间没有源代码的可执行隐藏方法Winforms包含大约20个文本框,每个文本框上有8000个字符。这些文本框隐藏在表单之外,我将它们缩小为隐藏在GroupBox中。如果我将禁用它们或使它们成为不可见的,并在代码需要时启用它们,它会有帮助吗?或者任何其他解决方案?



我尝试过:



我检查.exe与ANTS PERFORMENCE,它说很多时间需要无源的可执行隐藏方法

when i built release project, and when im double click on .exe file of compiled project it tooks around 2 minutes to open, , my project only 173Kb size.I checked .exe with ANTS PERFORMENCE, it says that much time takes "executable hidden methods without source" Winforms contains around 20 textboxes with 8000 chars on each.Those textboxes hided out of the form and i made them small size hided into GroupBoxes. If i will disable them or make them invisble, and enabled them when code needs it, will it help? Or any another solution?

What I have tried:

I checked .exe with ANTS PERFORMENCE, it says that much time takes "executable hidden methods without source"

推荐答案

所以你放在表格上的文本框是你的用于存储我认为导致问题的值?



为什么不在代码中将这些变换为全局变量,以便将信息保存在那里?它们只是字符串值正确吗?



这些20个8000字符文本框的初始化最有可能引发您的问题。



谢谢
so the text boxs that you put on the form which you are using to store values I assume are causing the issue?

Why not convert these into variables global in your code so you can keep the information in there? they are just string values correct?

The initialization of these 20 8000 character text boxes are causing your issue most likely.

Thanks


这篇关于可执行应用程序需要很长时间才能启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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