This is a migrated thread and some comments may be shown as answers.

Form with only 6 buttons takes "long" time to open

3 Answers 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Morten Kirsbo
Top achievements
Rank 1
Morten Kirsbo asked on 16 Jan 2010, 11:00 PM
Hi there,

I am having the following problem: I have a form with 6 radButtons and 1 radLabel. The form takes a second or two to open. It's not much but still quite bad / disturbing for the users experience. Also, I'm on a somewhat powerful machine, so I worry about what users on slower machines is experiencing.

I made a form completely similar to the slow one, though without the radControls and it opens instantly. As soon as I add the 6 radbuttons and radlabel, it slows down. Final thing worth noting: When I have opened the slow form for the first time, and then closed it with me.close, and then try to open it again, the form appears almost instantly. It seems to me it could be some sort of initialization code that runs on the first time the controls are instantiated, maybe?

In that case, I'm hoping there is some way I could run this code before showing the form to the user. This way they will get a snappy experience, and not uninstall our app because of small annoyances like this :)

Thanks for any help!

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 18 Jan 2010, 08:29 AM
Hello Morten,

Thanks for contacting us and for reporting this issue. Before getting into any further details, I would like to ask you to give us a bit more information about your machine, particularly, whether you are using a x64 version of Windows? We have observed significant slowdown in .NET applications performance under x64 versions of Windows which is related to the Just-In-Time (JIT) compiler of the .NET Runtime (as some technical articles on the Internet claim). Since our controls use a theming mechanism that requires significant piece of code to be executed before showing the form, you might experience this slowdown when compiling against x64. In order to check this for sure, you could try explicitly building your project for x86 and starting it again. I hope this is helpful and also I look forward to receiving the requested details. Thanks for your time.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Morten Kirsbo
Top achievements
Rank 1
answered on 18 Jan 2010, 07:23 PM
Hey Deyan,

I tried compiling towards x86 and while I am not 100% sure, it really does seem to me that the form now opens a bit faster. So thanks for that, it seems better now than before.

However, we'd really like to get it speeded up if at all possible. As mentioned, when I open the form for the second time, it happens almost instantly (just as fast as opening a normal winform without any controls).

Is there any way to preload the form, or preload the theme, so we can get the snappy / fast experience from the beginning? We have one main form, where the user typically spends a minute or more, so if we could do the loading at that point, we'd have no problems.

Thanks for your help!

Morten
0
Deyan
Telerik team
answered on 21 Jan 2010, 12:35 PM
Hi Morten,

Thanks for getting back to me. In general, when loading a WinForms application build with Telerik controls, the ControlDefault theme is initially loaded and applied to all controls. In order to speed up things, this theme is not loaded directly from the XML files but it is deserialized and an IL code is generated instead within our DLLs.

However, if you are using other themes in your projects, you should keep in mind that the loading process for them will take more time since they are loaded from XML resources within the DLL, deserialized, registered in our (static) Theming Service and applied. Therefore, when you open the form for the second time, it opens way faster since the themes are already loaded.

A good approach in cases when slow loading applications are opened for the first time is to use a splash form which is displayed to inform the user that a time taking operation is being executed.

I would still like to ask you to prepare a sample application (or send me yours) so that I can take a look at it and see how I can help to make things better.

Note: you will have to open a new support ticket in order to be able to upload files.

Thanks for your time. I look forward to receiving the requested application.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Morten Kirsbo
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Morten Kirsbo
Top achievements
Rank 1
Share this question
or