SqlDataSource performance difference because of syntax

HI,

Can anybody imform me about exact performance difference when putting code below in one line without linebreaks and spaces? I
 got hunderds of lines of SqlDataSource in a .aspx file and somehow got in my head moving on one line should slighlty improve performance.. Seems not if file got smarly pre-compiled/loaded. Please inform me.

Thanks,
Floris.


    <asp:SqlDataSource ID="SDS_SelectInsertEmail" runat="server" ConnectionString="<%$ ConnectionStrings:Design_DealerdeskConnectionString %>"
        SelectCommandType="StoredProcedure" SelectCommand="proc_SelectInsertEmail">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="CompanyID" SessionField="CompanyID" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="from_email" />
            <asp:Parameter Name="bcc_email" ConvertEmptyStringToNull="False" />
            <asp:Parameter Name="email_body" />
            <asp:Parameter Name="email_subject" />
        </InsertParameters>
    </asp:SqlDataSource>
LVL 2
florisbAsked:
Who is Participating?
 
Juan_BarreraConnect With a Mentor Commented:
Hi Floris,
It doesn't make any difference. Even more, the SqlDataSource is not rendered, so there is no html optimization you can make.
0
 
florisbAuthor Commented:
Thankyou Juan!

hmm, sound like the answer. But surely the performance difference is always EXACTLY ZERO? For example the filesize does shrink a bit by putting on 1 line (less linebreaks); doens't this mean a few microseconds less to load (first run / after app.pool restart?) This would mean difference NOT zero.

Sorry, but ask for confirmation before I accept solution, cause a in general very well respected senior developer (ex-collega) very very strongly explained to me putting them on one line is 'better' (for performance).. ..I just want to be very very sure!!

Thank you.

0
 
Juan_BarreraCommented:
florisb,
It may be a difference in JavaScript: less size, less downloads, but not for a SqlServerData source control in ASP.NET.
What reasons did that colleague of your had to support his arguments?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
florisbAuthor Commented:
Hi,

reasoning college:
A huge .aspx files with 100+ lines of <SqlDataSource> is some Kb's smaller if you remove tabs/linebreaks, so putting statement 1 in line instead of many, saves little loading time / redering / (pre)compilling --> better performance.
0
 
florisbAuthor Commented:
(You already said) a SqlDataSource is not rendered.
I'm not sure SqlDataSource source is completely compiled / partly only precompiled. Depends on settings? I gotta (re)check this part of ASP.NET.. ..hope what you know can answer this for performance relation.
0
 
Juan_BarreraCommented:
florisb,
Has your collegue compared the code generated by a SqlDataSource written in separate lines against one written in just one line? A quick look with ILDASM will prove he is wrong.
Anyway, not wanting to enter a discussion here, so, I repeat what I've said in the first post: There is no difference.
0
 
florisbAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.