[Scummvm-devel] Less memory-aggressive plugin management

Kostas Nakos knakos at phys.uoa.gr
Fri Nov 9 14:43:33 CET 2007


OK,

Here are some thoughts and points of view expressed in the channel:

Initial research shows that the "naive" method of loading each plugin,
caching some info and then discarding them will not work out of the box.
In particular, the only thing that can be cached is the data returned
from the game####list of each engine, which according to our api is
"just for show" and not meant for real detection. The actual detection
is carried out at findgameid(), which is a proper function and cannot be
cached.

So that leaves us with:

Max Horn wrote:
> A more elaborate, but also more complicated approach, would be to split
> all plugins into two parts/plugins: One containing the detection code, and
> one containing the rest of the code. This *should* work (at least for most
> of our engines), assuming the engine implements detection sanely.

Since (at least) DC has a problem with this, we need to have support for
plugins both ways. E.g. as it is right now and a reduce memory version
with 2 separate plugin-files for each engine. The mode of plugin loading
(single or 2 files) can be determined either at runtime (load the
detection plugin, if it fails try the engine plugin) or at compile time.

The other thing of course is to partially redesign the plagin interface
so that the game info can be read from the engine plugins and allow it
to be cached for use.

K.




More information about the Scummvm-devel mailing list