c# - Coverting List<double>t to DataTable is Taking alot of Time -


i building small software clients need read data 3 list each list contains around 50000 data points , supply lists me array :

list<double>[] myvars = new list<double>[3]; (int x = 0; x < 3; x++) {     string temprowcell = "";     temprowcell = grdmaapingview.getrowcellvalue(0,         grdmaapingview.visiblecolumns[x].fieldname).tostring();     grdmaapingview.getrowcellvalue(x,         grdmaapingview.visiblecolumns[x].name.tostring());     mymodifiedtable.columns.add(temprowcell, typeof(string));     myvars[x] = pressin.getvaluesbyfilter(temprowcell).values.tolist();  }  (int c = 0; c < mymodifiedtable.columns.count; c++) {     foreach (double v in myvars[c])     {         string temp = mymodifiedtable.columns[c].columnname.tostring();         datarow temprow = mymodifiedtable.newrow();         temprow[temp] = v;         mymodifiedtable.rows.add(temprow);     } }  grdresults.datasource = mymodifiedtable.defaultview; 

the problem reading of data take long 75 seconds read . problem code have written ?

please if have suggestion it's welcome .


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -