--- deliantra/server/ext/map-scheduler.ext 2007/01/05 20:04:02 1.17 +++ deliantra/server/ext/map-scheduler.ext 2007/01/08 14:11:05 1.19 @@ -2,12 +2,13 @@ # this extension swaps out maps and resets them, in essence managing # the reset/swap policy of the server. +# it also contains the map prefetching logic our $DEACTIVATE_TIMEOUT = 20; # number of seconds after which maps get deactivated to save cpu our $SWAP_TIMEOUT = 35; # number of seconds after which maps inactive get swapped out our $SCHEDULE_INTERVAL = 2; # time the map scheduler sleeps between runs our $SAVE_TIMEOUT = 20; # save maps every n seconds -our $SAVE_INTERVAL = 0.1; # save at max. one map every $SAVE_INTERVAL +our $SAVE_INTERVAL = 0.2; # save at max. one map every $SAVE_INTERVAL cf::async_ext { $Coro::current->prio (Coro::PRIO_MIN); @@ -23,7 +24,7 @@ next if $map =~ /\.(?:pst|meta)$/; $map =~ s/∕/\//g; cf::map::find $map; - Coro::Timer::sleep 0.05; + Coro::Timer::sleep 0.3; } #TODO: should also preload random maps...