Is a clear and replace more efficient than a loop checking all records?
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-04-22T04:10:18Z
Indexed on
2010/04/22
4:13 UTC
Read the original article
Hit count: 189
I have a C# List, that is filled from a database.. So far its only 1400 records, but I expect it to grow a LOT.. Routinely I do a check for new data on the entire list.. What I'm trying to figure out is this, is it faster to simply clear the List and reload all the data from the table, or would checking each record be faster..
Intuition tells me that the dump and load method would be faster, but I thought I should check first...
© Stack Overflow or respective owner