GeorgeS,
I have the all 20k spells loading and displaying in a listview in +/-12s on a P4 3GHz machine. Seems to use about 15mb of memory
Probably not the most efficient way to do things, but it's fairly quick (depending on your point of view). It can be easily modified to allow searching by partial name too.
It could be done at load time so that there's no further waiting later on - or even threaded load so it's kinda invisible, and then you just show / hide the listview as need be.
Code:
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim r As New IO.StreamReader(OpenFileDialog1.FileName)
ListView1.BeginUpdate()
While Not r.EndOfStream
Dim s() As String = Split(r.ReadLine, "^")
Dim lv As New ListViewItem(s(0))
lv.SubItems.Add(New ListViewItem.ListViewSubItem(lv, s(1)))
ListView1.Items.Add(lv)
System.Windows.Forms.Application.DoEvents()
End While
ListView1.EndUpdate()
r.Close()
r.Dispose()
r = Nothing
GC.Collect()
End If