vb.net - How to Load a Generic class without loop -


Well, it's just me who is working at a much slower pace slowed considerably:

  public function GetList () list (as) new list of sales orders (try dim list as sales orders) in DIS as DIS = CDS = cls.GetSalesOrderList 'CLS data access Class is i = 0 for DSTibles (0) .Rows.Count-1 DataRow = DSTibles (0) as a Row Line. ROV (i) DIM KK as cell Sorder = new Selsordr () Kekekaidi = val (Panktikaitm ( "ID") and "") KkkSalesOrderNo = RowkItem ( "Sales radiation") & amp; "" KKsell orderdate = line.item ("order date") & amp; "Kk.CustomerId = val (Panktikitm (" customary ") and amp;" ") list. Add (KK) hold the next return list catches as Akspasn out and and and and function  

now once I began to receive more than 10,000 records from the table, then loop takes longer to load values ​​in general. is there any way that I can get rid of the loop Can I do the following with the generic class? Class I can do?

txtSearch.AutoCompleteCustomSource.AddRange (Array.ConvertAll (DataRow, String) (BusinessLogic.ToDataTable.ConvertTo (WorkOr derList). Select), function (Detarev line) line ( "TradeContactName")))

would have thought I issue a With loop and not with the amount of data, your loop method is only appearing to be the process of each data once, so there is no major performance accident (like every line Received to looping over again dataset for that sort of thing). Any method you choose is looping through all your data at the end of the day.

They can be a little more efficient than their methods but they are not going to be so much. 'I'll see if you can do some refactoring to reduce your data set (eg. Do it for a certain period or evenly) or you can do or do any of the codes, instead of searching the database or searching for that list. For example, if you just want to add values ​​to that list, then you can almost certainly improve through the stored procedure that will summarize the database instead of the code.

I know this has not answered your question directly, but this is mainly because I do not know in a more efficient manner how to do this specific one rather than in general Raised the question as asking for optimization :)


Comments