|
-
Jun 24th, 2004, 01:05 PM
#1
Thread Starter
Member
vb.net web form performance issue
I have a web form that interacts with a database. when you select an item from one of two corresponding combo boxes, it sets the other combobox to the an equivalent value by reloading the page.
Dropdown boxes:
box 1 box2
1 red
2 blue
3 green
if you select box 1 to "1" box two will be set to red when the page reloads. if you select "green" for box 2, box 1 will be set to "3" when the page reloads.
sometimes this works but is slow.... It takes a good 6 or 7 seconds to rerun the page. Worse, if i change the box a few times, it eventually just reloads a blank web page, with no form on it at all. Am I doing something wrong? Can I expect better performance when I move this from my laptop to a real server (accessing a separate SQL server)?
-
Jun 24th, 2004, 02:50 PM
#2
I wonder how many charact
Many things can affect the performance...
In .Net web apps, the first time you run an application, the server must compile it.. so if you're just changing code, then running, and stopping, and changing code, then running and stopping, you will always have the initial build wait included. Subsequent requests to the web will not have to build the application (unless it has been hours).
I can only fathom how much power and memory you have on your laptop, so of course, that is always an issue. We have a piii ~700mhz server here at work we test against, and it takes 7-8 seconds for it compile our (HUGE) web app on initial build. Again, subsequent requests run like fire.
Also, and probably most influential is the architecture of how you build your program. Unnecessary calls and loops and postbacks may be going on without being obvious. You should post your code for your webpage for further help with this. I mention this because another post you made just recently stated you are running to the SQL server on every postback. That is an extremely expensive operation.
-
Jun 25th, 2004, 07:31 AM
#3
Thread Starter
Member
IT was the database connection...
You answered my other post too... The problem was that I was populating the table from a sql server db and every postback was making a new connection. I found a way to read the info i needed into hashtables and save that in the viewstate so that on a postback I did not need to connect again. Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|