Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Performance issue when dynamically populating a dropdownlist from a hidden frame

Reply
Thread Tools

Performance issue when dynamically populating a dropdownlist from a hidden frame

 
 
Wim
Guest
Posts: n/a
 
      04-27-2005
Hi Everyone,

I'm trying to speed up a Asp.net 1.1 applications' performance. The
application needs to run in an environment with little bandwith and
therefore pagesizes and roundtrip times shoud be brought back to a
minimum.

The application suffered from relatively large screens. A typical aspx
page was 500 Kbyte so page load times were in the order of 40 - 50
seconds. After unsufficient loading improvement using .net caching
techniques like outputcaching and partial caching (location=Client), I
went on the track of local (client-side) caching using hidden frames. I
furthermore changed the navigation (dropdown menu) to load the
userpages in another frame and added javascript to load the data from
the hidden frames into the controls. So far, a pretty standard
approach.

Some details of the pages and the loading techniques:
The data in the hidden frames is stored in javascript arrays (generated
on the server) and only needs to be posted once. The page loaded in the
hidden frame containing the data is about 200 KBytes. But the userpages
decreased about 70% or more in size!!!
To load the data into the dropdownlists I issue a client-side
parents.myframe.location="pagetoload.aspx" when the user selects "page
to load" from the menu. In "pagetoload.aspx" I stated an
onload="LoadControls()" in the form tag to populate the controls
automatically.

I hope somebody is still with me

After several different approaches however, I cannot get the javascript
which loads the data to perform under 15 seconds, and of course I would
like to bring it back to 1 or 2 seconds.
The pages contain about 16 dropdownlists and some textboxes. Each
dropdownlist gets loaded with approximately 500 options, so we are
facing a load of about 8,000 options.

This brings me to my question: is the dynamic loading of dropdownlist
options in javascript given the number of options reasonable or can it
be done in much less time?
The way I add the options is pretty standard:

var Option = new Option
for (var i=0;i < parent.hiddenframe.arraywithtext.length; i++)
{
Option.Text = parent.hiddenframe.arraywithtext[i]
Option.Value = parent.hiddenframe.arraywithvalue[i]

parent.userframe.forms("LoadedPage").items("dropdo wnlist").Add(Option)
}

Is there a way to speed things up? I tried to disable the dropdownlist
while loading but that does not deliver too much improvement, if any at
all...

Thanks a lot for reading, hope somebody has an idea!
Wim

 
Reply With Quote
 
 
 
 
Wim
Guest
Posts: n/a
 
      04-27-2005
Sorry wrong code, the new Option is of course placed inside the
for-loop....

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
populating asp:dropdownlist programmatically amessimon ASP .Net 3 06-02-2011 06:46 AM
issue when populating data in textbox on dropdownlist box selection Dhananjay ASP .Net 1 12-23-2007 03:55 AM
issue when populating data in textbox on dropdownlist box selection Dhananjay ASP .Net Web Controls 0 12-18-2007 07:03 AM
Problem populating dropdownlist control =?Utf-8?B?Q0hSSVM=?= ASP .Net 1 04-13-2004 01:33 PM
Populating Select <option>s with form/frame/js Robert Kattke Javascript 1 03-07-2004 03:08 AM



Advertisments