|
From: Ermete G. <ex...@li...> - 2003-07-15 17:38:53
|
I made a new benchmark with random seek position and read. The archive was composed of 100 files of 1Mb size, filled with insignificant data. These are the results. Benchmark: "10000 times: reading exactly 10Kb from a random file at a random position" Elapsed time: 7571 milli-seconds - This one was done after few time elapsed from the archive creation. The OS may had some data in its cache Benchmark: "10000 times: reading at max 10Kb from a random file at a random position" Elapsed time: 9123 milli-seconds - This one is done after lots of time the archive was created. - Note: I observed that the reading process is pretty slow in the beginning 1000-2000 tries.. then it becomes very quick I completed the defragmentation process too... now the only thing missing is the developers table. Implementation notes: For now, the PAQSolidFile does NOT keep track of the opened files. Once a file is opened, it is forgotten until it asks for a manipulator. If we want a secure library I think we must keep track of opened files and close them when we call the lockSolidFile. (remember that if we add a file after another one is opened, the first one may become corrupted = crash or corrupted data) But the game engine does not mind of changing a PAQ file, so the "lock" and "release" functions are never called. So we can ignore this if we want "pure speed". I've attached the source zip containing all the code, except the test utility. Anyway, how can I istantiate the first PAQManager class? I've not understood it yet... I have the static member, then? In my tests I changed the constructor from protected to public to make the things work. I'll update the task in sourceforge as soon as I become a "project developer". Regards exio82 |