Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Any performance hit when using inline code? (http://www.velocityreviews.com/forums/t71887-any-performance-hit-when-using-inline-code.html)

Showjumper 01-30-2004 01:01 AM

Any performance hit when using inline code?
 
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?



Scott Allen 01-30-2004 01:22 PM

Re: Any performance hit when using inline code?
 
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"
<shojumper@grkjashdjkf.com> 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?
>



Kevin Spencer 01-30-2004 02:32 PM

Re: Any performance hit when using inline code?
 
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" <shojumper@grkjashdjkf.com> wrote in message
news:#1D9Uys5DHA.2300@TK2MSFTNGP10.phx.gbl...
> 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?
>
>





All times are GMT. The time now is 06:30 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.