Hard disk question

Blitz3D Forums/Blitz3D Beginners Area/Hard disk question

Farflame(Posted 2005) [#1]
Sorry to ask so many questions today, I'm in that kinda mood :)

Just wondering, does anyone know if I will run into problems if I create a HUGE file in Blitz (by huge, I mean it could go over 1gb in size, or more!). Does Blitz or Windows, or anything else, have a problem with large files? Will Blitz slow down when I access the file? Is there a file size limit?


WolRon(Posted 2005) [#2]
Are you serious? 1GB?

Rethink your problem.


jfk EO-11110(Posted 2005) [#3]
On OSes older than Win2000 the default max size is 2 Gigabyte AFAIK (Maybe there are some patches, most old-os users don't have them installed). You're on the save side when you keep the size under 2 gigs. I also guess BLitz has an internal limit of 2 gigs due to 32 Bit adressing. reading and writing such a file (eg 1.5 Gigs) may take some time, eg. half a minute or so.


Farflame(Posted 2005) [#4]
The reason my file may become so large, is that I need to access it very regularly, and I found that if I made lots of small files, it took ALOT longer to be constantly opening and closing lots of files. I found it was much faster to have a single large file and to keep it open for a few seconds - do all the work with it - then close it again.

I doubt it will ever become 1gb, but it's nice to know the limits.


big10p(Posted 2005) [#5]
When you say "lots of files", how many are you talking about, roughly?

Also, why do you keep opening and closing them. Just keep them open for as long as you need, then close them when no longer needed - even if this is when the program ends. Once you've opened all your files, accessing them shouldn't be much (any?) slower than accessing the one large file.


Farflame(Posted 2005) [#6]
Unfortunately, I mean 'lots'. I'm working on an online Soccer management game. It's getting close to complete. The file in question holds the data for the players (the football players, not the 'managers' who play the game). Depending on how many people play the game and how many teams are active, there could be literally thousands upon thousands of players. Initially I made one file for each player, but it caused real problems. When it comes to the training schedules, every single player needs to be loaded in (at the server end), updated, then saved again. Even with just 1000 or so players, it was pretty slow. With 100,000 it's unbearable. Open the file, load the player in, update, save, close file - 100,000 times. With just 1 large file, it's MUCH faster.

The downside of the large file is...... well, firstly it's size. And secondly, I'm having to give each player a set amount of space in the file so that I can use random access. It's messier, but it's fast.