ASP.NET/Visual C# Performance

  • Thread starter Thread starter Trevor Oakley
  • Start date Start date
T

Trevor Oakley

I am using ASP.NET Kick Start (SAMS) to learn Visual C# and ASP.NET.

I find that some of the examples are slow to run (eg using ListBox
events).

This is making me question the performance of the generated code, and
if more server resources are needed.

I use shared server space.

I have a 2M bit connection to the Internet, and some simple examples
using only three list items take 1-2 seconds to run.

I have been looking for a reason why c# is not more widely used. Is it
a performance question? Would my code run better on a dedicated server
(this costs the same since I have several sites on shared space)?
 
As an FYI we have commercial web apps in use within our co which have in
excess of 1000 items in listboxes, combos etc and these load on a 1.5Mb
connection in < 5 seconds so there can be a number of things contributing to
your performance issues, none of which relate to C#'s performance as a
language per se.

- the responding server's capacity
- your net connection (shouldn't be an issue)
- compilation of the app on first hit (consecutive loads should be
significantly faster if you do a refresh(not a rebuild or the app will
recompile again)
- lack of caching in the web app

and a million more things.

From the sounds of it tho, I'd say you're running the sample apps in debug
mode and making a judgement based on the page load times on first run and
this is not indicative of real performance.

A couple of basic links:
asp.net architecture (note the footnote at the bottom re "dynamically
generated assembly "
http://www.aspfree.com/c/a/ASP.NET/ASP.NET-Architecture-1/5/

Article on the page lifecycle
http://www.15seconds.com/issue/020102.htm
 
As an FYI we have commercial web apps in use within our co which have in
excess of 1000 items in listboxes, combos etc and these load on a 1.5Mb
connection in < 5 seconds so there can be a number of things contributing to
your performance issues, none of which relate to C#'s performance as a
language per se.

- the responding server's capacity

I'll probably move to a dedicated server, this costs the same since I
have over ten sites, and each costs about $20 a month.

The server does get overloaded, due to the high number of sites on one
server.
- your net connection (shouldn't be an issue)
- compilation of the app on first hit (consecutive loads should be
significantly faster if you do a refresh(not a rebuild or the app will
recompile again)
- lack of caching in the web app

and a million more things.

From the sounds of it tho, I'd say you're running the sample apps in debug
mode and making a judgement based on the page load times on first run and
this is not indicative of real performance.

This is true, actually my book already mentioned this. Also I have a
db connection, which is used to bind results. But it is clear that
some events are very slow compared to others, eg listbox methods.
 
Back
Top