I was wondering if there are ways to speed up loading from a file if that file is very large. I'm writing a game program that stores a boards information one character at a time, and in the end I have several thousands (if not more!) of boards saved into a text file.
Saving is no problem, but the problem comes when the game starts up because the program then loads each and every board to be placed into a hash file. It reads the file one character at a time recreating a board, and when it hits the end of the line the board is complete and it places it to the hash, then goes to the next line. This is starting to take a long time and will only get longer as the text file grows. I wasn't sure if there was possibly a different way to save and load that might possibly be faster like for example maybe saving in binary? Any ideas would be appreciated!