.NETGURU
Speed - Databind() vs Label.Text
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngspeed' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

James Yang
-- Copied from [aspngfreeforall] to [aspngspeed] by Charles M. Carroll <Click here to reveal e-mail address> --This is a multi-part message in MIME format.------=_NextPart_000_0001_01C1A22F.6C57F1B0Content-Type: text/plain;    charset="us-ascii"Content-Transfer-Encoding: 7bitHi What's the performace difference between Using Repeater and binding the data reader to it Vs Using Label server control and build the html using Label.Text+="<html>" + datareader["field"]; Thanx Jmes------=_NextPart_000_0001_01C1A22F.6C57F1B0Content-Type: text/html;    charset="us-ascii"Content-Transfer-Encoding: quoted-printable<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =xmlns:w=3D"urn:schemas-microsoft-com:office:word" =xmlns=3D"http://www.w3.org/TR/REC-html40";><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =charset=3Dus-ascii"><meta name=3DProgId content=3DWord.Document><meta name=3DGenerator content=3D"Microsoft Word 10"><meta name=3DOriginator content=3D"Microsoft Word 10"><link rel=3DFile-List href=3D"cid:filelist.xml@01C1A22F.68EF4B40"><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument></xml><![endif]--><style><!-- /* Font Definitions */ @font-face    {font-family:SimSun;    panose-1:2 1 6 0 3 1 1 1 1 1;    mso-font-alt:\5B8B\4F53;    mso-font-charset:134;    mso-generic-font-family:auto;    mso-font-pitch:variable;    mso-font-signature:3 135135232 16 0 262145 0;}@font-face    {font-family:"\@SimSun";    panose-1:2 1 6 0 3 1 1 1 1 1;    mso-font-charset:134;    mso-generic-font-family:auto;    mso-font-pitch:variable;    mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal    {mso-style-parent:"";    margin:0cm;    margin-bottom:.0001pt;    mso-pagination:widow-orphan;    font-size:12.0pt;    font-family:"Times New Roman";    mso-fareast-font-family:SimSun;}a:link, span.MsoHyperlink    {color:blue;    text-decoration:underline;    text-underline:single;}a:visited, span.MsoHyperlinkFollowed    {color:purple;    text-decoration:underline;    text-underline:single;}span.EmailStyle17    {mso-style-type:personal-compose;    mso-style-noshow:yes;    mso-ansi-font-size:10.0pt;    mso-bidi-font-size:10.0pt;    font-family:Arial;    mso-ascii-font-family:Arial;    mso-hansi-font-family:Arial;    mso-bidi-font-family:Arial;    color:windowtext;}span.SpellE    {mso-style-name:"";    mso-spl-e:yes;}span.GramE    {mso-style-name:"";    mso-gram-e:yes;}@page Section1    {size:595.3pt 841.9pt;    margin:72.0pt 90.0pt 72.0pt 90.0pt;    mso-header-margin:35.4pt;    mso-footer-margin:35.4pt;    mso-paper-source:0;}div.Section1    {page:Section1;}--></style><!--[if gte mso 10]><style> /* Style Definitions */=20 table.MsoNormalTable    {mso-style-name:"Table Normal";    mso-tstyle-rowband-size:0;    mso-tstyle-colband-size:0;    mso-style-noshow:yes;    mso-style-parent:"";    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;    mso-para-margin:0cm;    mso-para-margin-bottom:.0001pt;    mso-pagination:widow-orphan;    font-size:10.0pt;    font-family:"Times New Roman";}</style><![endif]--></head><body lang=3DEN-AU link=3Dblue vlink=3Dpurple =style=3D'tab-interval:36.0pt'><div class=3DSection1><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Hi<o:p></o:p></span></f=ont></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>What’s the <spanclass=3DSpellE>performace</span> difference =between<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Using Repeater and =bindingthe data reader to it<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Vs<o:p></o:p></span></f=ont></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Using Label server =controland build the html using<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><span class=3DSpellE><font size=3D2 =face=3DArial><span lang=3DEN-USstyle=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Labe=l.Text</span></font></span><fontsize=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>+=3D”<html>” + <span =class=3DSpellE><spanclass=3DGramE>datareader</span></span><span =class=3DGramE>[</span>“field”];<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><span class=3DSpellE><font size=3D2 =face=3DArial><span lang=3DEN-USstyle=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Than=x</span></font></span><fontsize=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span=></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Jmes<o:p></o:p></span><=/font></p></div></body></html>------=_NextPart_000_0001_01C1A22F.6C57F1B0--
Reply to this message...
 
    
Yannick Smits
-- Moved from [aspngfreeforall] to [aspngspeed] by Charles M. Carroll <Click here to reveal e-mail address> --Let's find it out! Add trace=true to your <%@ Page %> tag and look at theresults for both scenario'shth,Yannick Smits"James Yang" <Click here to reveal e-mail address> wrote in messagenews:568718@aspngfreeforall...HiWhat's the performace difference betweenUsing Repeater and binding the data reader to itVsUsing Label server control and build the html usingLabel.Text+="<html>" + datareader["field"];ThanxJmes
Reply to this message...
 
    
G. Andrew Duthie (VIP)
Keep in mind, though, that turning on tracing has its own impact
(negative) on performance. So if all you care about is a general delta
between the two techniques, you may be able to get a rough idea from
looking at the trace log. But it won't give you an accurate picture of
how the pages actually perform.

For a more accurate picture, it would be better to build one page for
each technique, then hit those pages with a load testing tool such as
the Web Application Stress Tool (http://webtool.rte.microsoft.com/).
This will allow you to test both the overall performance of the two
techniques, as well as to see whether either or both perform well or
poorly under load.

More info on perf testing:
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/dnduwc=
o
l/html/sampleapp07062000.asp
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/dnduwo=
n
/html/d5wast_2.asp
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/dnduwo=
n
/html/d5collection.asp
(watch for url wrapping)

hth,

--
G. Andrew Duthie
Graymad Enterprises, Inc.
Click here to reveal e-mail address
Author, ASP.NET Step By Step
http://www.amazon.com/exec/obidos/ASIN/0735612870/

[Original message clipped]


What's the performace difference between

Using Repeater and binding the data reader to it

Vs

Using Label server control and build the html using

Label.Text+=3D"<html>" + datareader["field"];

Thanx

Jmes

| [aspngspeed] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.asplists.com/asplists/aspngspeed.asp =3D JOIN/QUIT=20
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
 
System.Reflection.Emit.Label




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification