ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-scheduler.ext
(Generate patch)

Comparing deliantra/server/ext/map-scheduler.ext (file contents):
Revision 1.18 by root, Fri Jan 5 21:51:41 2007 UTC vs.
Revision 1.19 by root, Mon Jan 8 14:11:05 2007 UTC

6 6
7our $DEACTIVATE_TIMEOUT = 20; # number of seconds after which maps get deactivated to save cpu 7our $DEACTIVATE_TIMEOUT = 20; # number of seconds after which maps get deactivated to save cpu
8our $SWAP_TIMEOUT = 35; # number of seconds after which maps inactive get swapped out 8our $SWAP_TIMEOUT = 35; # number of seconds after which maps inactive get swapped out
9our $SCHEDULE_INTERVAL = 2; # time the map scheduler sleeps between runs 9our $SCHEDULE_INTERVAL = 2; # time the map scheduler sleeps between runs
10our $SAVE_TIMEOUT = 20; # save maps every n seconds 10our $SAVE_TIMEOUT = 20; # save maps every n seconds
11our $SAVE_INTERVAL = 0.1; # save at max. one map every $SAVE_INTERVAL 11our $SAVE_INTERVAL = 0.2; # save at max. one map every $SAVE_INTERVAL
12 12
13cf::async_ext { 13cf::async_ext {
14 $Coro::current->prio (Coro::PRIO_MIN); 14 $Coro::current->prio (Coro::PRIO_MIN);
15 # load the header of swapped-out maps. 15 # load the header of swapped-out maps.
16 # this is not a correctness issue, it simply saves diskspace 16 # this is not a correctness issue, it simply saves diskspace
22 for my $map (@$files) { 22 for my $map (@$files) {
23 utf8::decode $map; 23 utf8::decode $map;
24 next if $map =~ /\.(?:pst|meta)$/; 24 next if $map =~ /\.(?:pst|meta)$/;
25 $map =~ s/∕/\//g; 25 $map =~ s/∕/\//g;
26 cf::map::find $map; 26 cf::map::find $map;
27 Coro::Timer::sleep 0.05; 27 Coro::Timer::sleep 0.3;
28 } 28 }
29 29
30 #TODO: should also preload random maps... 30 #TODO: should also preload random maps...
31}; 31};
32 32

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines