Re: [Algorithms] High-Speed Flat File System
Brought to you by:
vexxed72
From: Mick W. <mi...@mi...> - 2007-02-14 20:16:20
|
On 2/14/07, John Ratcliff <jra...@in...> wrote: > > [...] > > However, today, I am working with an MMO game engine that has constantly > changing game assets. This isn't a 'problem' this is by design. The > entire > game environment can change on a continuing basis. This greatly enhances > the play experience since there is always new content to be found. > [...] > In this way allocating a space for a new file is pretty much the same as > allocating memory normally. If there is no spot for it, you can either > grow > the file or throw away the oldest or least used file out (presuming you > have > a backend way to get the data back if needed.) Since garbage collection > on > a flat file is out of the question, [...] > Is it really out of the question? Sure, you'd potentially have to move hundreds of megabytes to fill a hole, but essentially what you are doing is defragmenting, which you can do as a low-priority background task. Frequently changed assets will bubble to the end of the file system, so repeated changes won't take so long. You could also probably allow quite a significant amount of fragmentation (say 10%) which would speed everything up a lot. Mick. |