Results 1 to 14 of 14

Thread: [RESOLVED] Better Option Than List (Of...) For Disk Load Time

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    [RESOLVED] Better Option Than List (Of...) For Disk Load Time

    I have a football simulation game I've been working on. I have just created a design to store players' career stats. I chose using List Of collections for every stat (there are over 60) with each index representing the year the player played. I needed to create a simple array for each stat as well to simulate preseason, regular season, and post season stats (3). So a sample stat storage line in a player's constructor looks like this:

    Code:
    Private m_intPassAttempts(3) as New List(Of int16)
    Then I initialize the array like this

    Code:
    for x = 0 to 2
         m_intPassAttempts(x) = new List(of Int16)
    next
    This works great until I save a game file to disk and then reload it; it takes too damn long! It's not awful but I'm looking to speed it up the load time a bit.

    My question is simple: is there a better collection class than List (Of...) for disk performance? Something with less overhead? Is Arraylist or Hashtable less memory intensive? I've changed all the smaller number stats like Games Played and INTS to Byte instead of Int16 which helped a bit, but I'm looking for another option as well.

    Thanks,
    Eric
    Last edited by neef; Apr 5th, 2020 at 09:56 AM.
    Intermediate Level Programmer Extraordinaire

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width