DataSource Controls :: Executereader Is Taking To Much Time?
Jun 29, 2010
I'm using data access block [URL] in asp.net 3.5. Back end is sql server 2005. It's working fine and returns result instantly for all DB calls. But, I've a problem with one SP. When I call it, executereader is taking too much time. In few cases, it is executed. And sometimes I get the Time out error. I run the same SP in sql server. It returns 9000 rows in 3 seconds.
I am making some application in asp.net 1.1 in that I am displaying data in datagrid from database. In data grid first column is of check box and radio button and in the last column we have text box now thing is that when i click on check box crosponding textbox we fill some figure and at the end we press calculate button to get total. After getting total we have to press continue button to go next step
But suppose if some body remove that check the we should press calculate button or chnage some figure in the text box then we should press calculate button again to recalculate. for that i kept autopost back on check box oncheckedchanged event and text box ontextchanged event and hide continue button so user will click calcutae button abd then continue button will re-apper
Problem it that it taking too much refresh and taking long time. So was lloking for some ajax method to use in my application.
I have an application which imports data from csv to sql server 2005. It is taking long time to import data from csv to sql server 2005. it has a timer. on tick of timer, I am checking if current rown in csv exists in database. If it exists, It is not added to sql server otherwise, It is added that row to sql server 2005. Also, In page load, It checks on each tick, whether user is logged in or not. it adds value to log file that user is logged in. How can I optimize this ?
when i am runnig the project, the crystal report(rpt) file will taking too much time for loading on first time... any one please help me to avoid the time delay for loading the rpt file in first time .
I had implemented the Ajax timer control to update Gridview data(along with Progress bar inside Gridview) after some interval of time.Below is the full code:
HMTL:
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <%--style & Script for progress bar in Gridview --%> <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript" src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <link href="css/jquery-ui.css" rel="stylesheet" />
I am retrieving records from database nearly 380 records and binding them to a repeater control.My page is taking long time to load. how to improve the performance and here is the code of my repeater.
Im trying to take the example from this website http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sql-server-2008-proximity-search-with-th and make it work on my site. Its this part im having troubles with
[Code]...
here is my code from my function that doesnt work.
[Code]...
Any suggestions on how to get it to work? it fails at rdr = cmd.ExecuteReader(); im also worried it will also fail at ZipCodes.Add(rdr["h.*"].ToString());
I have a big form in which i have almost 10 update panels. some are having updatemode = conditional and others are always. Now by default when that page is opened i only show one dropdownlist.When that project dropdownlist (from which i populate the rest of the elements in my page) value is changed by user it takes long time to load the other elements. Also the other gridview which is also surrounded by update panel and mode in conditional takes long time to show edititemtemplate controls in edit mode.
I am unable to trace the reason behing delay. Few days ago it was working fine and fast but now it is slow.
I have List (of class). having 1800 of count and each object has 90 properties. When I terate earch with 90 properties taking more and more time. How to resolve this
Dim cellIntStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle cellIntStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat("#") Dim cellDateStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle cellDateStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat(Format ("dd-MMM-yyyy")) For Each mReport As Report In dtExcel row = sheet1.CreateRow(iRow) j = 0 For Each prop As PropertyInfo In props Dim value As Object = prop.GetValue(mReport, Nothing) If IsInt(value) Then CreateRow(row, j, CType(value, Integer), cellIntStyle) ElseIf IsDate(value) Then CreateRow(row, j, String.Format("{0:dd-MMM-yyyy}", value), cellDateStyle) Else CreateRow(row, j, value) End If j = j + 1 Next iRow = iRow + 1 // Coming here taking so long... how to make it fast. Next Private Sub CreateRow(ByRef row As HSSFRow, ByVal colId As Integer, ByVal value As String) row.CreateCell(colId).SetCellValue(value) End Sub Private Sub CreateRow(ByRef row As HSSFRow, ByVal colId As Integer, ByVal value As Integer, ByVal cellStyle As HSSFCellStyle) Dim cell As HSSFCell = row.CreateCell(colId) cell.SetCellValue(value) cell.CellStyle = cellStyle End Sub Private Sub CreateRow(ByRef row As HSSFRow, ByVal colId As Integer, ByVal value As String, ByVal cellStyle As HSSFCellStyle) Dim cell As HSSFCell = row.CreateCell(colId) cell.SetCellValue(value) cell.CellStyle = cellStyle End Sub
I am having a Gridview which takes much time to load its data, I tried to make the loading faster by implementing paging in gridview and reducing the rows to render in the grid and it got worked to an extent but still it lags in processing to bind data. The database i am using is SQL Server 2005 and the code is as follows
DataTable dtProducts = objProducts.GetProductDetails(iCat.ToString(), userId); dgrdProductList.DataSource = dtProducts; dgrdProductList.DataBind(); public DataTable GetProductDetails(String CatID, String UserID) { DataAccess DAB = new DataAccess(); DataTable dtbProducts = new DataTable(); try { string SQL = "select *,CAST(ShortDescription AS varchar(200)) AS ShortDescriptionList from vw_products where IsActive=1 AND CategoryID = " + CatID + " AND LanguageID in( SELECT PW_UserLangRel.LanguageID FROM PW_Language INNER JOIN " + " PW_UserLangRel ON PW_Language.ID = PW_UserLangRel.LanguageID WHERE PW_Language.IsActive=1 AND PW_UserLangRel.CompanyID=" + UserID + " ) Order By ID Desc,LanguageID"; dtbProducts = DAB.Fill(SQL, CommandType.Text).Tables[0]; } catch (Exception ex) { throw new Exception(ex.Message + "WebShopPaolo.CProducts.AddProductImages"); } return dtbProducts; }
I have tested my pages in Firefox & IE and looking at Firebug in Firefox for some reason some images are taking a long time to load. They are not very big in comparison to the ones which are loading quicker.
Attached is a screenshot of Firebug.
I especially notice it in IE with the progress bar at the bottom of the page, it just sits there saying loading image...
Could it be the path or something which is http://localhost:49211/Content/_layout/images/bg-footer.png for example
I want to alert some message on the click of a Button which is inside the Update Panel. Therefore I used "scriptmanager.registerstartupscript" but after using this I found that my event started responding slowly. Can anyone please help me in finding an alternative of "scriptmanager.registerstartupscript".The point that needs to be noted is that the button is in an Update Panel. And its my cenessity to find some alternative of it.
We are using asp.net ajax 1.1 (and can't upgrade to latest for internal known reasons). We are having a page where we call ScriptService method through ASP.Net ajax and oncallback of result, we bind that result to Html controls on the page. During testing we observed that this whole process is taking too much time. When we profiled using IE8 developer toolbar, we observed that there is one standard function from ASP.net Ajax frameworks' own JS. Function name is function$_validateParameterType and it is the one which takes maximum time amongs others. Is there any way we can reduce the time take by this. Is there any standard practice for such requirements.
The home page of my website and some other page also are taking some time to load, instead of making them load fast, I want some please wait screen or progress bar and mean while the required page would be loaded behind.
I am using grid view with row "data bound event" at row row data bound i am using some function with loops to fill drop down of grid view in template columns. grid view gets populated with selected index change event of drop down. my problem is the asp.net page is getting slower i mean when grid populates its taking some time and some time page get hanged what to do to get rid of it?
i have a loging page, once i login into my application it is redirecting into main dash borad screen. where i am displaying data from other server. it is taking time to load page..
case 1:- in my dashboard one block i am displaying some simple info like alerts, news, mails count..etc.. that is comming from my local database ( there is no performance issues on that..)
case 2: in the same page (dashboard block) i am showing data, it is comming from another server.. first it will check the credentials and retrive data and displaying in same dashboard screen ( here it is taking time)
once hit the login button and redirecting into a dashbard screen using response.redirect("dashbard.aspx"); it is redirecting to dashbard screen..once all the process of page load is comple,,,then it is displaying the dashboard page what i am looking is first i want to redirect to the dashboard screen and then process the case1 ( simple data ) ..and for case2 i just want to show some ajax spinner image on the second block..
I am using making application asp.net 2.0. In my page there is Data List which is having two buttons. When user click on the button it is doing some process and taking some time. Due to that user some time click twice and it will make problem in application. So to stop that I wanted to show progress bar until button click process done.
Whenever I add an entry to the Hosts file on Windows, it takes a long time for the change to take place? I have tested using Firefox and IE and it seems to take around 5 minutes on both of them before the new IP/Domain entry on Hosts is recognised.
Is there anything I can do to overcome this? Perhaps "refreshing" the cache in some way? ipconfig /flushdns doesn't work.
When I Publish my website it takes around an hour and a half. This is publishing to a directory on my local machine, it is not FTP'ing to a remote server. The build seems to take about an hour (when I build without publishing it is noticeably slow, but 5 minutes slow, not an hour), then the publish seems to take a further half an hour.
what could be causing this and how I can improve this? This obviously causes issues when I make a change (I'm constantly updating the site) as I need to wait for an hour an a half. I'm considering not precompiling the site now and simply uploading the .aspx and .cs files direct to the server as this is unmanageable for me.