>Footprint has been something that I've been very concerned about. When
>I did some profiling several months ago I found that about half the
>footprint was due to the spelling dictionaries which are always
>loaded. I don't know how the pspell stuff works, but here's how it
>worked for ispell:
Our ispell dictionaries never get loaded, which is a good thing. How Pspell
works is beyond my knowledge though. If & when I turn on gnome-spell
compilation, it will use Pspell in a CORBA server, which means that all
Gnome Apps will use the same Pspell manager from a Bonobo connection. This
means that all apps use the same dictionary, and thus we aren't adding to
the system's total memory footprint, which is a good thing.
>I strongly believe that importers and exporters should be plugins that
>are dynamically loaded. It makes little sense to have them in memory
>100% of the time when they are only needed a .05% or less of the time
>(during imports and exports). In fact, I belive that many features
>should be in plugins. For some of my early thoughts on this, see
>http://www.abisource.com/mailinglists/abiword-dev/99/February/0055.html.
>As for NSPR: *shudder*. To me, mozilla spells bloat.
I'd suggest g_module_open () instead of using dlopen() on Unix. It works
flawlessly everywhere glib runs (Mac, Be, Win32). I've actually looked into
the Glib source code and the code for each platform's backend isn't too bad
at all. So my suggestion is to _model_ our API on GModule's API just because
it works.
For reference,
http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-modules.html
Attached is an XAP API and a Glib impl of it.
Dom
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
// By Dom Lachowicz Dec 20, 2000 <[EMAIL PROTECTED]>
// purely abstract base class
class XAP_Module {
public:
XAP_Module (const char * file_name) = 0;
virtual ~XAP_Module (void) = 0;
virtual void resolveSymbol (const char * symbol_name, void ** symbol) =
0;
virtual void makeResident (void) = 0;
virtual char * getModuleName (void) const = 0;
virtual char * getErrorMsg (void) const = 0;
};
// Glib impl. MSFT version would be easy to do
#include <glib.h>
class XAP_UnixModule : public XAP_Module {
public:
XAP_UnixModule (const char * file_name)
{
m_module = g_module_open(file_name);
m_name = g_module_name (m_module);
}
~XAP_UnixModule (void)
{
g_free(name);
g_module_close (m_module);
}
virtual char * getModuleName (void) const
{
return m_name;
}
virtual void resolveSymbol (const char * name, void ** symbol)
{
g_module_symbol (m_module, name, symbol);
}
virtual void makeResident (void)
{
g_module_make_resident (m_module);
}
virtual char * getErrorMsg (void) const
{
return g_module_error (void);
}
private:
GModule m_module;
const char * name;
};