I am currently using a Hashtable to store a list of unique identifiers and associated data, all of which is read in from a file.
The length of this data file can very greatly, from 1 entry to several hundred thousand. I've noticed a significant slowdown in the speed of adding entries to the Hashtable once it gets past about 50,000 entries.
I think setting the initial capacity might help, but obviously I can't know this number since the data is read from a file. Can anyone suggest a way to speed up adding a lot of entries, or is this behavior pretty normal?
edit: Right now I am just using a Hashtable. I think it should probably be Dictionary<string, MyDataObject>, but that seems like a separate issue.