[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Glob2-devel] File open performance increase
From: |
Stephane Magnenat |
Subject: |
[Glob2-devel] File open performance increase |
Date: |
Wed, 27 Feb 2002 11:54:42 +0100 |
Hi,
The problem of slow loading in glob2 is due to the fact it tries to load all
know image format (png, bmp, jpg, jpeg, pnm, xpm, lbm, pcx, gif, tga) for all
images.
To speed-up the process I've set the define
LOAD_ALL_IMAGE_TYPE
that is undef by default and that force glob2 to try to load other format
that png. (by default it loads only png).
I've also implemented a cache in the fileManager that makes it searchs the
file in the same directory of the last file.
With this cache I got 76 % efficiency (Hit/(Miss+Hit) ratio) with the define
which speedup the file opening process by a factor of 1.77 by reducing the
number of fopen from 5029 to 2840.
Without the define the cache is very bad with an efficiency of 25% and
increasing the number of fopen from 16000 to 17000.
So I will keep the cache and the define being undef.
I hope you love thoses nice scientific measurments.
Note that there is always a memory trash with the AI near BasePlayer
destructor. Luc, I need you there.
Steph
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Glob2-devel] File open performance increase,
Stephane Magnenat <=