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

Comparing deliantra/maps/perl/map-prefetch.ext (file contents):
Revision 1.9 by root, Wed Aug 2 11:17:08 2006 UTC vs.
Revision 1.10 by root, Thu Aug 3 11:23:58 2006 UTC

2 2
3# this plug-in prefetches maps. everytime a player enters a map, 3# this plug-in prefetches maps. everytime a player enters a map,
4# it will asynchronously prefetch files from disk (it will not load them 4# it will asynchronously prefetch files from disk (it will not load them
5# into the server, but into the OS cache only). 5# into the server, but into the OS cache only).
6 6
7if (0) { #test#
8use Errno (); 7use Errno ();
9use Time::HiRes; 8use Time::HiRes;
10use Fcntl; 9use Fcntl;
11use IO::AIO; 10use IO::AIO;
12 11
117 my ($ob) = @_; 116 my ($ob) = @_;
118 117
119 prefetch_map $ob->map; 118 prefetch_map $ob->map;
120} 119}
121 120
121if (0) { #test#
122# prefetch a few players/second 122# prefetch a few players/second
123{ 123{
124 my @players; 124 my @players;
125 125
126 Event->timer (interval => 0.2, cb => sub { 126 Event->timer (interval => 0.2, cb => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines