In this method reading a big data from a text file it's lines about milionen and it takes between 6 until 7 min to read and filter that . so is there anyway to make it more faster ?
- private static List
GetWebShopDataAccesses( string path) - {
- List
elements = new List (); - List<string> lines = File.ReadAllLines(path).ToList();
- var filterIPs = lines.Where(x => x.Contains("google")).ToList();
- Parallel.ForEach(filterIPs, line =>
- {
- // do some staff
- });
- return elements;
- }
Abdalla OmranPosted Jan 3, 2020, 3:52 AM
Amit GuptaPosted Jan 2, 2020, 9:40 AM
Ashutosh GuptaPosted Jan 2, 2020, 8:16 AM