Re: Load plugin libraries on demand.

From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Tue Jul 22 2003 - 23:41:31 EDT

  • Next message: ericzen: "AbiShot"

    > AbiWord has now built up quite an array of
    > plugins. However
    > some of them, particularly ImageMagic, take fair
    > while to load, which
    > provides AbiWord with a significant increase in load
    > time.
    >
    > It occured to me that we should really use the same
    > mechanism we use to
    > load plugins to load these extra libaries upon
    > execution.
    >
    > So these additional libraries only get loaded once
    > the plugin is
    > actually activated.
    >
    > So my idea is that all plugins in the plugin
    > directory get loaded at
    > start up and put their UI into the menu system and
    > their static methods
    > into the ev_EditMethods structures as they do
    > currently.
    >
    > However in the case of the plugins which link to
    > large external
    > libraries, these only get loaded once the
    > functionality of the library
    > is actually needed.
    >
    > Now I'm a bit of my depth here but I imagine we
    > could reuse the current
    > code load the plugins to do this secondary linking.
    >
    > I KNOW this is currently a problem. Debian, Bless
    > their hearts, makes a
    > full 1.99.2 version with all the plugins available
    > on Debian SID. I used
    > it the other day and was shocked to be presented
    > with a 4-5 second load
    > time on a fast machine.

    Lazy loading of plugins would be nice. The preferable
    way to do this would probably involve ui-like files
    that insert the appropriate edit methods,
    importers/etc... into their respective lists and UI
    positions. I believe that Gnumeric has something like
    this - and I think that Rodrigo put code along these
    lines into libgnomeoffice a while back.

    I don't think that this is something we should target
    for 2.0, especially seeing how late in the release
    cycle this is. We have access to mhatta and the other
    debian maintainer. The easy fix - and IMO, the correct
    fix given the current state in the release cycle -
    should get them to stop loading the IM plugin, as it
    shouldn't even be used on Unix.

    Cheers,
    Dom

    __________________________________
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com



    This archive was generated by hypermail 2.1.4 : Tue Jul 22 2003 - 23:55:33 EDT