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

Opening RadWindow via Client-side javascript can be slow

5 Answers 364 Views
Window
This is a migrated thread and some comments may be shown as answers.
Debbie
Top achievements
Rank 1
Debbie asked on 18 Jul 2008, 04:51 PM
My parent page has a gridView -- which can easily have 1000+ rows.   This page loads relatively quickly (4 seconds or less).

I also have a button on the page, that opens the RadWindow via client-side javascript -- on the buttons onclientClick event I'm calling OpenRadWindow()

function

OpenRadWindow()
{

    var radWindow = GetRadWindowManager().GetWindowByName( 'rwAddItem');

    radWindow.Show();

}

I have the RadWindow control set to ReloadOnShow = false and , so it isn't attempting to reload the page again when I show it. I've also set ShowContentDuringLoad to true on the RadWindow control.   Both have provided no improvement.

When the parent's gridView has a small amount of data it shows just fine. But in cases where I have many more rows in the grid, and I click the button to show the radwindow, it is VERY VERY SLOW. But since i'm doing this all client-side, no server side postbacks, shouldn't this all be relatively quick. 

The contents of the window, when loaded in a standard browser window load just fine, so I just don't understand why it would load so slowly based on teh content of the parent page.

Thanks!
Debbie

5 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 20 Jul 2008, 10:00 PM
I think Telerik will probably need a sample project to find the answer for you and they'll probably ask for one in a support ticket, so you may want to get one ready ;)

My only suggestion would be to try using just a RadWindow control instead of a RadWindowManager (unless there's a reason you need the manager).  If you do need the manager, you could still access the RadWindow directly:

var objRadWindow = $find("<%= rwAddItem.ClientID %>");
objRadWindow.show();

You could also try adding a RadScriptManager and a RadStyleSheetManager to the page if you haven't already.

Hope that helps,

Shaun.
0
Georgi Tunev
Telerik team
answered on 21 Jul 2008, 11:58 AM

Shaun, you know us so well :)

Debbie, can you please let me know if this happen in debug mode or in production? Generally speaking when compilation debug is set to true, the framework outputs a lot of client debug code that could cause problems similar to the one that you experience. Try setting debug to false and see how your application behaves.




Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shaun Peet
Top achievements
Rank 2
answered on 23 Jul 2008, 05:01 AM
Hi Debbie,

I just wanted to add the following as a great resource, just in case you haven't read it already:

http://telerikwatch.com/2008/05/optimization-tips-testing-page.html

There's alot of great tips in there that would be a great starting point.

Shaun.
0
Sypher
Top achievements
Rank 1
answered on 18 Sep 2008, 06:58 PM
I know it has been a couple of months, but...$0$0$0$0Debbie, I'm seeing the same thing.  I've got all of the suggested optimization stuff in place.  I have a RadWindowManager on a master page, and I'm opening a window from it.  The window takes ten extra seconds to load the first time.  If I open the source page for the RadWindow in the browser window directly the first time, it doesn't have the extra wait.$0$0$0$0$0My application is huge and complicated, so making a sample to send in would be a challenge.  I am using custom skins (everything is skinned using ASP.NET themes (App_Themes directory), and a lot of RadControls on the window.  I have multiple windows with the same problem, but this one in particular has a RadEditor, four RadGrids, a RadChart, five RadColorPickers, and a RadComboBox.  Many of the controls are in modular UserControls on the page and are skinned (Default.skin file in the App_Themes directory).$0$0$0$0$0The slowdown seems to point to the RadWindowManager since the page loads much faster when I don't use it and just open the page in the browser.  I have a RadStyleSheetManager and a RadScriptManager in both the root page's master page and the popup page's master page.  I didn't add any specific stylesheets or scripts to either of them, though.  And my RadWindowManager does use embedded skins (Vista) with no animation.$0$0$0$0$0If you find anything to speed yours up, Debbie, let us know.  I'll do the same. :-)$0$0$0
0
Tervel
Telerik team
answered on 19 Sep 2008, 07:34 AM
Hi sypher,

Since you state that your application is complex and setting a test project would be problematic, I have 2 suggestions for you:

1. Set ShowContentDuringLoad = true for the RadWindowManager.
For large pages such as yours this property can make a visible difference.

2. In case this does not make a notable difference, please make the same test with a regular IFRAME - and see whether it behaves the same.
E.g. instead of RadWindowManager, add an IFRAME to your page.
Add a button which, when clicked, will load the slow-loading page into the iframe using simple javascript, e.g.

<button onclick="document.getElementById('testIframe').src='SlowLoadingPage.aspx';return false;">Click me</button>

Of course, the best option would be (as already mentioned) if someone could send us a sample project that demonstrates the difference in loading time in RadWindow and out of RadWindow - so that we can test properly on our end.


Best regards,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Debbie
Top achievements
Rank 1
Answers by
Shaun Peet
Top achievements
Rank 2
Georgi Tunev
Telerik team
Sypher
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or