james at globalmegacorp.org
Fri Jun 10 14:43:17 EDT 2005
Well.. is this necessary? I mean.. Linux will keep it cached basically
until the ram is needed.. so the map should already be in the cache from
the last time it was used. So the load should only be from the disk the
first time.. Seems that doing this piping to /dev/null might be
extraneous to me..
On 6/10/2005 11:23 AM, Einar S. Idsø wrote:
> Yes, that's exactly what I thought when I saw this thread. And with the
> nice Python-interface to BF2, this should be quite simple to accomplish.
> Just run a check in the main Python script to see if the time until
> round end is less than, say, 15 seconds, or if the number of ticks is so
> and so low. If either check turns out tru, start to nicely read the map
> into ram, for instance by piping to /dev/null like you suggest.
> ScratchMonkey wrote:
>>Linux is very aggressive about caching, so you really don't need a
>>ramdisk, just some way to get the next map into the cache ahead of time.
>>If there was a way to know what the next map was, you could just run a
>>slow process that reads all pages in the file that completes before the
>>current map ends. Perhaps something like "nice 1 dd if=mapfile
More information about the Bf1942