XK8ER
asked on
vb.net - load large txt data into listview
hello there,
I have this code to load data into a listview but since its about 50,000 records its taking a about 8 to 15 seconds to load..
I was wondering if there is a way to load these items faster?
I have this code to load data into a listview but since its about 50,000 records its taking a about 8 to 15 seconds to load..
I was wondering if there is a way to load these items faster?
Public Sub LoadNames(ByVal mPath As String, ByVal LVW As ListView)
Dim lvi As ListViewItem, line As String
If System.IO.File.Exists(mPath) Then
Using sr As New System.IO.StreamReader(mPath)
While Not sr.EndOfStream
line = sr.ReadLine()
If line.Length > 0 Then
lvi = LVW.Items.Add(line)
End If
End While
End Using
End If
End Sub
ASKER
i think you are in the wrong section
How large are the records per row?
Why or what are you going to do with the records?
May be better to break down into sections.
Why or what are you going to do with the records?
May be better to break down into sections.
ASKER
I just want to import the records into a listview.. samples here
Daniel
Salmon
Bob
Roby
Lenny
Daniel
Salmon
Bob
Roby
Lenny
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.siccolo.com/Articles/CodeProject/Open_DataSet_From_TextFile/open_dataset_from_text_file.html