I have a list of String like this
private object = new object();
public List<string> list {
get{
lock(object){
return _list;
}
}
}
List<string> _list = new List<string>();
//some event which trigger's 1000 in a second
public void event(object sender, string e){
list.add(e);
}
public void processList(){
//process the list items one by one and remove it.
}
public void writeOnDisk(){
//write list on Disk
}
now my problem is List Processing Rate is slower than populate. And I want to take the backup of the list on disk for application crash or system failure but afraid if write list Disk than it will slow down the performance. I do not want to loose the data even a single item. Can you suggest me best approach in this regard