P
Paul Tomlinson
All very simple app which loads a log file, parses it and displays the lines
in a listview.
I was playing about with some largeish files 800K and I noticed that the app
would never return control, it would just sit and consume 100% CPU for
aslong as I could be bothered to wait before I pskill's the app.
Anyway I was playing and found that even the code below takes a matter of
minutes to populate the control:
listView_Details.BeginUpdate();
for( int i = 0; i < 10000; i++ )
{
ListViewItem l = listView_Details.Items.Add( "Hello" );
l.SubItems.Add( "Hello" );
l.SubItems.Add( "Hello" );
l.SubItems.Add( "Hello" );
}
listView_Details.BeginUpdate();
Can somone, please anyone tell me how I can speed this operation up.
Thanks
PT
in a listview.
I was playing about with some largeish files 800K and I noticed that the app
would never return control, it would just sit and consume 100% CPU for
aslong as I could be bothered to wait before I pskill's the app.
Anyway I was playing and found that even the code below takes a matter of
minutes to populate the control:
listView_Details.BeginUpdate();
for( int i = 0; i < 10000; i++ )
{
ListViewItem l = listView_Details.Items.Add( "Hello" );
l.SubItems.Add( "Hello" );
l.SubItems.Add( "Hello" );
l.SubItems.Add( "Hello" );
}
listView_Details.BeginUpdate();
Can somone, please anyone tell me how I can speed this operation up.
Thanks
PT