Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,
I have repeater which taking around ~20 seconds to render 5k records. Is there any possibility to improve responce time. No Paging.

My sql query taking almost 1 second to select all records.

Kindly suggest appropriate solutions.
Thnaks
Posted
Comments
Andy Lanng 18-Mar-15 10:27am    
Why no paging? Have you considered scrolling paging like google / youtube?

If you're not going to post your code then the only suggestion is to break down the size of the work the code is performing across.

This will involve getting the data from a web-service so it can be updated client side so you can either scrap the repeater, or generate the repeater markup and just write it to the page.

Another (not great) idea would be to push through x results with an updatepanel at the end which then gets the next x results with an update panel at the end. You won't need the web-service but the markup will look very off by the end
F-ES Sitecore 18-Mar-15 10:45am    
Is the person looking at the page going to use all 5,000 records? Are they going to go through them all? Read them, process them, make decisions based on them? Every one of them? If the answer to that question is "no" then you don't need to show 5,000 records and the answer to your problem is to find some other way of showing the data. Paging is obviously one way, maybe having a search function and showing the results rather than showing everything. Outputting that much data just doesn't make sense.

1 solution

Thanks Andy for reply!!

I have simple repeater which have 7 columns. In server side I am getting data through DataTable and binding directly. Client want sorting on entire data, so paging will be issue to apply on entire data.

I think repeater is taking time while rendering much of data.

Is there any solution to improve time.


<asp:repeater id="rptLocationList" runat="server" onitemcommand="rptLocationList_ItemCommand" xmlns:asp="#unknown">
<headertemplate>


<asp:linkbutton id="lnkFieldName" runat="server" commandname="FieldName">File Name
<asp:linkbutton id="lnkStatus" runat="server" commandname="Status">Status
<asp:linkbutton id="lnkLastModifiedDate" runat="server" commandname="LastModifiedDate">Last Modified Date
<asp:linkbutton id="lnkLastModifiedBy" runat="server" commandname="LastModifiedBy">
CssClass="hrefclass">Last Modified By
<asp:linkbutton id="lnkAvgYield" runat="server" commandname="AvgYield" cssclass="hrefclass">Avg Yield
<asp:linkbutton id="lnkOilOrNDFD" runat="server" commandname="OilOrNDFD" cssclass="hrefclass">Oil% Or NDFD

<itemtemplate>
<asp:hyperlink id="LinkStory" font-bold="true" font-underline="false" forecolor="Blue">
Style="white-space: nowrap;" runat="server" NavigateUrl='<%# Eval("FieldName", "~\ViewLocationDetails.aspx?LocationName={0}").Replace("#", "-hash-") %>'
Text='<%# Eval("FieldName") %>'>
<asp:hyperlink id="LinkConflicts" font-underline="false" enabled="<%#Eval(" statuslinkenable")="" %&gt;"="">
runat="server" Font-Bold='<%# Eval("StatusFontBold") %>' ForeColor='<%# System.Drawing.ColorTranslator.FromHtml(Eval("StatusForeColor").ToString()) %>'
NavigateUrl='<%# Eval("FieldName", "~\ManageConflicts.aspx?LocationName={0}").Replace("#", "-hash-") %>'
Text='<%# Bind("Status") %>' ToolTip='<%#Eval("StatusLinkToolTip") %>'>
<%#DataBinder.Eval(Container.DataItem, "LastModifiedDate", "{0:MM/dd/yyyy}")%>
<asp:label runat="server" text="<%#Eval(" lastmodifiedby")="" %&gt;"="" style="white-space: nowrap;">
<%#DataBinder.Eval(Container.DataItem, "AvgYield")%>
<%#DataBinder.Eval(Container.DataItem, "OilOrNDFD")%>
<asp:imagebutton id="btnView" commandname="View" commandargument="<%#Eval(" fieldname")%&gt;"="">
ImageUrl='<%#Eval("btnViewImageUrl")%>' Enabled='<%#Eval("btnViewEnable")%>'
runat="server" ToolTip="View/ Print Location Details Report" OnClientClick="frmFTDMain.target ='_blank'; document.location.href=document.location.href; " />
<asp:button id="btnUpload" causesvalidation="false" commandname="Upload" runat="server">
ToolTip="Upload template" Enabled='<%#Eval("btnUploadEnable")%>' CssClass='<%#Eval("btnUploadCssClass")%>'
UseSubmitBehavior='<%#Eval("btnUploadSubmitBehaviour")%>' OnClientClick='<%# String.Format( "return openWinUpLoad(""{0}"", ""{1}"",""{2}"",""{3}"");" , Eval("FieldName") , Eval("Crop"),Eval("UserName"), Eval("Status") )%>' />
<asp:button id="btnDownload" style="display: none" text="Download" commandname="Download">
OnClientClick="Disclaimer()" CommandArgument='<%#Eval("FieldName")%>' runat="server" />

onclick="Disclaimer('<%#Eval("FieldName").ToString().Replace("'", "-apostrophe-")%>')" />
<asp:imagebutton id="btnSubmit" imageurl="<%#Eval(" btnsubmitimageurl")%&gt;"="" runat="server">
OnClientClick='<%# String.Format( "return OnSubmit(""{0}"", ""{1}"");" , Eval("Crop") , Eval("AvgYield") )%>'
CommandName="Submit" Enabled='<%#Eval("btnSubmitEnable")%>' CommandArgument='<%#Eval("FieldName")%>'
ToolTip="Submit template" />
<asp:imagebutton id="btnDel" imageurl="<%#Eval(" btndeleteimageurl")%&gt;"="" runat="server">
CommandName="Delete_Field" Enabled='<%#Eval("btnDeleteEnable")%>' CommandArgument='<%#Eval("FieldName")%>'
ToolTip="Delete template" OnClientClick='<%# String.Format( "return ConfirmOnDelete(""{0}"");" , Eval("FieldName") )%>' />


<footertemplate>





And server side code :

rptLocationList.DataSource = dtLocations
rptLocationList.DataBind()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900