I have a 150mb file. Each line is made up of the same format eg/
I,h,q,q,3,A,5,Q,3,[,5,Q,8,c,3,N,3,E,4,F,4,g,4,I,V,9000,0000001-100,G9999999990001800000000000001,G9999999990000001100PDNELKKMMCNELRQNWJ010, , , , , , ,D,Z,
I have a Dictionary<string, List<string>>
It is populated by opening the file, reading each line, taking elements from the line and adding it to the dictionary, then the file is closed.
StreamReader s = File.OpenText(file);
string lineData = null;
while ((lineData = s.ReadLine()) != null)
{
var elements = lineData.Split(',');
var compareElements = elements.Take(24);
FileData.Add(elements[27], new List<string>(compareElements));
}
s.Close();
Using the method in this answer I calculated my dictionary to be 600mb. That's 4 times what the file is.
Does that sound correct?