Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::GeorgeS's Tools

Development::GeorgeS's Tools A forum just for GeorgeS's tools

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #27  
Old 07-01-2008, 10:26 AM
nosfentora
Discordant
 
Join Date: Oct 2004
Location: In a house
Posts: 387
Default

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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:53 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3