Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Any performance hit when using inline code?

Reply
Thread Tools

Any performance hit when using inline code?

 
 
Showjumper
Guest
Posts: n/a
 
      01-30-2004
Is there a peformance hit when using inline code? As an example, lets i
store a user's preferences for backgtound color of a page. When he/she logs
in, i stick the color value into their session and then pull it out on the
next page and populate the bgcolor of the body directly in the html. Does
this approach have any loss in performance as compared to adding
runat=server to the body tag and accessing it from code behind? If there is
a loss in performance, can it add up with a number of users?


 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      01-30-2004
You don't pay a performance penalty for inline code since the runtime
will compile it.

--
Scott
http://www.OdeToCode.com

On Thu, 29 Jan 2004 19:01:23 -0600, "Showjumper"
<(E-Mail Removed)> wrote:

>Is there a peformance hit when using inline code? As an example, lets i
>store a user's preferences for backgtound color of a page. When he/she logs
>in, i stick the color value into their session and then pull it out on the
>next page and populate the bgcolor of the body directly in the html. Does
>this approach have any loss in performance as compared to adding
>runat=server to the body tag and accessing it from code behind? If there is
>a loss in performance, can it add up with a number of users?
>


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      01-30-2004
There may be a slight performance differenc ewith regards to the initial
compilation if you don't use a DLL for the CodeBehind. However, as Pages are
cached after compilation, the difference would be minimal.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Showjumper" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Is there a peformance hit when using inline code? As an example, lets i
> store a user's preferences for backgtound color of a page. When he/she

logs
> in, i stick the color value into their session and then pull it out on the
> next page and populate the bgcolor of the body directly in the html. Does
> this approach have any loss in performance as compared to adding
> runat=server to the body tag and accessing it from code behind? If there

is
> a loss in performance, can it add up with a number of users?
>
>



 
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
server performance hit using asp to return an image rvj ASP General 1 08-10-2008 11:43 AM
Webparts app running always in design mode: Any performance hit? yashgt@gmail.com ASP .Net 1 08-08-2007 01:02 AM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Can't hit the site by name but I can hit by IP CK ASP .Net 9 10-19-2006 08:01 PM
Performance hit using exception handling using aCC zzfreddybb C++ 4 01-12-2005 10:26 PM



Advertisments