[CF-Devel] client image handling changes.

Mark Wedel mwedel at sonic.net
Wed Mar 6 22:23:49 CST 2002


Scott MacFiggen wrote:

>
     
      The only complaint I have about this has to do with how the client currently
     
     >
     
      caches images. At the moment when I play on a LAN server using image
     
     >
     
      caching is actually slower because the client stores each image in a
     
     >
     
      seperate file in the cache directory. So everytime I get an image it
     
     >
     
      has to open a file, write the data, and close the file which results in a
     
     >
     
      disk sync. Using a single memory mapped based file would probably be
     
     >
     
      better, and much faster.
     
     
 Hm.  Interesting thought - since the new caching code does use a file to track
what images it has and what the checksum is (so that at least it doesn't need to
open the file, calculate checksum, and say, yes/no on using that file), it would
be fairly easy to change that to use a single file and also store offsets and
lengths in that file.

 This would mean it is harder to remove or view specific image files.  But it
would be faster.

 Note this could result in a very large file in the home directory - I suppose
this could get broken into smaller pieces, eg, only store 500 images in each one
or something.

 I really don't want to have to support both method (large conglomerate files as
well as individual files).  Do people have a strong issue of not having the
individual files available in the cache, and only use a few big files?

    
    


More information about the crossfire mailing list