[Scummvm-devel] Another plugin question
yotambarnoy at gmail.com
Wed Sep 9 17:00:22 CEST 2009
> [Folks, *please* don't send HTML mails. They make live annoying in
> many ways!]
Sorry... Now that I know I'll try to remember.
> That is theoretical possibility. However, you have to realize that
> this will cause a serious overhead if detecting in multiple dirs: Load
> an plugin (lots of disk I/O involved), run the detection code (more I/
> O involved), unload the plugin, load another, run the detection code
> again (accessing the same files), repeat.
I may not have had the time to dig deep enough in the code to get it,
but what's the difference between this and the way we do it right now?
Don't we just load all the plugins (same disk I/O), run detection code
for each plugin (more or less same disk I/O unless we eliminate
files/dirs from the list of possibilities -- do we?) minus the final
plugin load for the chosen game. The only other thing we don't do is
unload many times, which is cheap to do. No?
>From a cursory glance, it seems to me that all we need is to make
EngineManager know how to load/unload plugins before detecting in
EngineManager::detectGames(). But I haven't had time to look at the
> The other alternative that has been floated here in the past is to
> separate the detection code from the rest of the plugin, i.e., have
> some kind of two tier plugin system: For each engine, have one small
> plugin which only has the detection code, and one big plugin that has
> the full engine. That solves the above mentioned memory issue, but of
> course complicates the build process and plugin management. But at
> least it should be transparent to the engine if done properly.
Sounds good too.
> Anyway, the real problem is the NDS which only has 4 MB ;).
Forgot about that pesky DS... :)
More information about the Scummvm-devel