TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abdalla Omran
NA
334
32.4k
Parallel.ForEach (is there any thing more faster) ?!
Jan 2 2020 7:48 AM
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<WebShopDataAccess> GetWebShopDataAccesses(
string
path)
{
List<WebShopDataAccess> elements =
new
List<WebShopDataAccess>();
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;
}
Reply
Answers (
3
)
This SqlTransaction has completed; it is no longer usable ?
Undirected graphs in graph#