Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
Hi everybody,
 
I wrote this lines of code in my page for this my browser performence is decressed. Is there any other option to increase my browser performence
 
here i'm using for loop but in my datatable having 5000 records for this my browser performence is decressed.
 
But i want to read all the Doc_Id, Revision details from my datatable.
 
 
for (int i = 0; i < dsDocument.Tables[0].Rows.Count; i++)
{
    string Doc_Id = dsDocument.Tables[0].Rows[i]["Doc_Id"].ToString();
    string Revision = dsDocument.Tables[0].Rows[i]["Dwg_Rev_No"].ToString();
    string Query = "<Where>" +
                    "<And><Eq><FieldRef Name='Dwg_No'/><Value Type='Text'>" + Doc_Id + "</Value></Eq>" +
                    "<Eq><FieldRef Name='Dwg_Rev_No'/><Value Type='Text'>" + Revision + "</Value></Eq></And>" +
                                 "</Where>";
    dtDrawing = objFile.ListContent(objCurrentSite.SiteURL, objCurrentSite.WebSiteName, "Drawing", Query);
 
    dt.Merge(dtDrawing);
    dt.AcceptChanges();
}
Posted 14-Dec-12 17:24pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Updating 5000 records from a web page is retarded. That is your core issue. No matter how you do it, it will take time. If you must do it, then don't do it in the page lifecycle, ask a service to do it.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 530
1 mhegazy94 460
2 Ravi Bhavnani 230
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,295
1 OriginalGriff 6,841
2 CPallini 5,420
3 George Jonsson 3,654
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web03 | 2.8.140922.1 | Last Updated 15 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100