Re: [gnome-db] Unloading unused providers?





2009/3/18 Murray Cumming <murrayc murrayc com>
libgda loads the shared libraries for all available providers, though
most applications only need one. I guess that adds some wasted
per-application memory use. Is there any way to unload the other
providers?

They already are unloaded. Here is how it works:
* when the list of providers is needed, all the providers are loaded (using g_module_open)
* once the list is computed, the providers are all unloaded, exept if they can't be, which is the case for the JDBC provider because I haven't found a way to do so (see providers/jdbc/libmain.c)... I think it could be done with a bit more work.

Maybe the solution, if an application knows it will only ever need one provider, is, before the providers are scanned, to allow one to specify the needed provider(s). In this case Libgda can filter the providers' shared libraries and filter on them before even calling g_module_open().

What do you think?



I'm also concerned about the JDBC provider. Just by initializing the
JVM, it seems to install a crash signal handler, which interferes with
normal crash handling, even if I don't want to do anything with that
provider.

Yes, I know that and find it very annoying, it also adds a lot of garbage when using valgrind...

Vivien




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]