Click here to Skip to main content
14,973,807 members
Home / Discussions / C#
   

C#

 
GeneralRe: data clustering Pin
OriginalGriff10-May-21 21:58
mveOriginalGriff10-May-21 21:58 
QuestionRegistry Redirection Pin
Richard Andrew x648-May-21 10:41
professionalRichard Andrew x648-May-21 10:41 
AnswerRe: Registry Redirection Pin
Dave Kreskowiak8-May-21 11:22
mveDave Kreskowiak8-May-21 11:22 
GeneralRe: Registry Redirection Pin
Richard Andrew x648-May-21 11:31
professionalRichard Andrew x648-May-21 11:31 
GeneralRe: Registry Redirection Pin
Dave Kreskowiak8-May-21 11:40
mveDave Kreskowiak8-May-21 11:40 
GeneralRe: Registry Redirection Pin
Richard Andrew x648-May-21 11:47
professionalRichard Andrew x648-May-21 11:47 
GeneralRe: Registry Redirection Pin
Dave Kreskowiak8-May-21 14:05
mveDave Kreskowiak8-May-21 14:05 
QuestionHow to speed up datatable updation for high volume of data Pin
Mou_kol6-May-21 0:01
MemberMou_kol6-May-21 0:01 
Reading data from xml file and load into datatable. i can not load data into List<t> because datatable has some dynamic column whose name is not known at compile time.

I have one List<t> and one datatable. _AllCommentsData is List<t> and dtData has datatable.

More or less _AllCommentsData has 10,000 to 20,000 data and dtData datatable has high volume of data. approx some dtData datatable has 70,00,000 data means 7 million data. when traversing in high volume of data and update one column value is taking long time. so guide me how to refactor or restructure the code as a result update one column value with high volume of data would take very less time. any work around exist to deal this situation?

i could join my datatable and List together and update field value but i could not do it because few column name is dynamic in datatable. so in LINQ select i can not mention their name and that is the reason i query datatable in loop and update data.

can i use Parallel.For() or AsParallel ? please guide me with some sample code which i can use to speed the data updation when there is high volume of data in data table. Thanks

My Sample Code which is taking long time for high volume of data.
C#
foreach (var item in _AllCommentsData.Where(a => a.CommentType == "Only LI"))
                         {
                             if(item.Comments!="")
                             {
                                 tmpData = dtData.AsEnumerable().Where(a => a.Field<string>("Section") == item.section
                                     && a.Field<string>("LineItem") == item.LineItem
                                     && (a.Field<int?>("EarningID") == null ? 0 : a.Field<int>("EarningID")) == item.EarningID);
        
                                 if (tmpData != null && tmpData.Count() > 0)
                                 {
                                     tmpData.ForEach(x =>
                                     {
                                         x["LI_Comment"] = 1;
                                     });
                                 }
                             }
                         }

AnswerRe: How to speed up datatable updation for high volume of data Pin
OriginalGriff6-May-21 0:52
mveOriginalGriff6-May-21 0:52 
AnswerRe: How to speed up datatable updation for high volume of data Pin
Gerry Schmitz6-May-21 7:33
mveGerry Schmitz6-May-21 7:33 
GeneralRe: How to speed up datatable updation for high volume of data Pin
Mou_kol6-May-21 22:49
MemberMou_kol6-May-21 22:49 
GeneralRe: How to speed up datatable updation for high volume of data Pin
Gerry Schmitz7-May-21 9:57
mveGerry Schmitz7-May-21 9:57 
GeneralRe: How to speed up datatable updation for high volume of data Pin
#realJSOP11-May-21 1:01
mva#realJSOP11-May-21 1:01 
AnswerRe: How to speed up datatable updation for high volume of data Pin
Eddy Vluggen6-May-21 9:15
professionalEddy Vluggen6-May-21 9:15 
GeneralRe: How to speed up datatable updation for high volume of data Pin
Mou_kol6-May-21 22:50
MemberMou_kol6-May-21 22:50 
GeneralRe: How to speed up datatable updation for high volume of data Pin
Eddy Vluggen7-May-21 2:32
professionalEddy Vluggen7-May-21 2:32 
AnswerRe: How to speed up datatable updation for high volume of data Pin
Richard MacCutchan7-May-21 0:01
mveRichard MacCutchan7-May-21 0:01 
QuestionHow to retrieve SQL Server CE toolbox in Visual Studio 2019? Pin
Alex Dunlop5-May-21 6:51
MemberAlex Dunlop5-May-21 6:51 
AnswerRe: How to retrieve SQL Server CE toolbox in Visual Studio 2019? Pin
Gerry Schmitz5-May-21 8:24
mveGerry Schmitz5-May-21 8:24 
QuestionGet the value from a checklistbox Pin
Luis M. Rojas5-May-21 6:35
MemberLuis M. Rojas5-May-21 6:35 
AnswerRe: Get the value from a checklistbox Pin
Gerry Schmitz5-May-21 8:19
mveGerry Schmitz5-May-21 8:19 
GeneralRe: Get the value from a checklistbox Pin
Luis M. Rojas5-May-21 11:01
MemberLuis M. Rojas5-May-21 11:01 
GeneralRe: Get the value from a checklistbox Pin
Gerry Schmitz5-May-21 11:18
mveGerry Schmitz5-May-21 11:18 
GeneralRe: Get the value from a checklistbox Pin
Richard MacCutchan5-May-21 21:16
mveRichard MacCutchan5-May-21 21:16 
AnswerRe: Get the value from a checklistbox Pin
Alan N6-May-21 4:06
MemberAlan N6-May-21 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.