calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
168 stars 41 forks source link

Non-stop disk access from Resource Manager #241

Closed x-qq closed 4 years ago

x-qq commented 4 years ago

Openboe keeps accessing the filesystem constantly, calling stat() on various resource paths (fonts, images, etc).

It is caused by the fact that in resource manager's get() function there simply isn't a branch that would not lead to disk access (provide the resource purely from cache).

https://github.com/calref/cboe/blob/master/src/fileio/resmgr/resmgr.hpp#L146

retropipes commented 4 years ago

Perhaps BoE needs a resource cache, then - preferably one that has eviction, so as not to use more RAM than needed.

clort81 commented 4 years ago

Why add a cache to code that doesn't need to be called in the first place?

Don't read the disk when you don't have to. Don't draw to screen when you don't have to.

CelticMinstrel commented 4 years ago

Fixed in 542c037342809f8a96f0066865a381d9e1fb5b4d b0fddcd8a67db5111dda14606431271a5de958bc 2d1ee24473b75896c2c213776b8e67620ce91763