… | |
… | |
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 | |
|
|
7 | if (0) { #test# |
7 | use Errno (); |
8 | use Errno (); |
8 | use Time::HiRes; |
9 | use Time::HiRes; |
9 | use Fcntl; |
10 | use Fcntl; |
10 | use IO::AIO; |
11 | use IO::AIO; |
11 | |
12 | |
… | |
… | |
149 | }; |
150 | }; |
150 | |
151 | |
151 | $prefetch->(); $prefetch->(); |
152 | $prefetch->(); $prefetch->(); |
152 | }; |
153 | }; |
153 | }); |
154 | }); |
|
|
155 | } |
154 | |
156 | |
155 | |
157 | |
156 | |
158 | |