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;
- }

Ashutosh GuptaRank #805 · 2.9K reputationPosted Jan 2, 2020, 3:16 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Jan 2, 2020, 4:40 AM EST
Abdalla OmranRank #5,857 · 284 reputationPosted Jan 2, 2020, 10:52 PM EST