Re: Footprint


Subject: Re: Footprint
From: Thomas Fletcher (thomasf@qnx.com)
Date: Wed Dec 20 2000 - 19:14:54 CST


On Wed, 20 Dec 2000, Aaron Lehmann wrote:

> On Wed, Dec 20, 2000 at 08:23:44AM -0500, Thomas Fletcher wrote:
>
> > Has anyone given any thought to us using the Netscape Portable Runtime
> > thingy so that we could make our importers/exporters work as plugins
> > rather than having them bound directly into the executable. Never having
> > written an importer or an exporter (though I'm tempted to look at a=20
> > writing a WordPerfect one) how solid is our API and what are other=20
> > people's thoughts on this?
>
> 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.
>
> $ find ~/src/mozilla/nsprpub -name '*.c' | xargs cat | wc -l=20
> 139076
>
> Seems like nspr includes _way_ more than portable plugins. Plugins
> are not hard... on Unix it's just a dlopen() and it shouldn't be too
> much harder on other platforms. The harder thing is defining a plugin
> API, which AFAIK nspr won't help us with. And we already have the
> importer/exporter class heirarchy...
>
> I suggest that we create a new XAP_Linker abstract base class that loads
> plugins. Derived classes for a specific architecture can implement the
> functionality. Unix seems pretty trivial. Mike, can you handle
> Windows? Thomas, QNX? What about BeOS?

I wasn't advocating the use of the _entire_ nspr, only the small portion
which is a generic cover for loadable modules on different platforms that
is already done for us for most platforms we are interested in.

Thomas



This archive was generated by hypermail 2b25 : Wed Dec 20 2000 - 19:12:50 CST