Re: Patch: Pluggable module loaders and demo loader

From: <msevior_at_physics.unimelb.edu.au>
Date: Thu Feb 03 2005 - 12:13:36 CET

> Hi again,
>
> Am Donnerstag, den 03.02.2005, 10:55 +0100 schrieb Robert Staudinger:
> [...]
>> Am Donnerstag, den 03.02.2005, 15:48 +1100 schrieb Martin Sevior:
>> [...]
>> > Hi Robert,
>> > This sound like it is just what I wanted for the GtkMathView
>> > but let me see if I understand....
>> >
>> > What I want is a way register a plugin that can then create a new
>> class
>> > linked to gtkMathView, without gtkmathview being linked to the plugin.
>>
>> Why should the plugin /not/ be linked to gtkmathview? I thought the goal
>> was to not link abi itself but the plugin.
>
> This came to my mind immediately after pressing send.
>
> If the problem is that e.g. startup time would suffer a lot because
> gtkmathview is linked to the plugin loaded at startup, we might consider
> the following extension to the ModuleManager:
>

Yes. Exactly!

> + Create a "pair" of plugins, the "hook" and the "renderer"
> + The hook would be a regular plugin as described in my previous email
> + We could have a peer directory "AbiWord-2.4/dynplugins/" to the
> existing "AbiWord-2.4/plugins/" where we put plugins loaded on
> demand
> + When the hook is activated it loads the renderer. The toolbars,
> menu entries ... would be contained in the hook, of course.
>

Yes. Exactly my thinking too.

> This would probably also benefit scripting plugins because we could load
> the interpreter on demand rather than at startup. We don't want to give
> away the crown of fastest launching word processor - do we?
>

No indeed :-)

This is exactly my chain of thought. We also need the build system to create
a prefix/plugins/subdirectory

We place plugins that are loaded on demand in *prefix/plugins/subdirectory*

The hooks look in this subdirectory for the explicit and expensive plugins
they need.

The changes to the code for the GtkMathView plugin are very small. I'd
simply create a new subclass of GR_Embedmanger whose only job is to
load the expensive GR_AbiMathManger which is linked to GtkMathView.

Exactly as shown in the code snippet.

Cheers

Martin

> Best,
> - Rob
>
>
Received on Thu Feb 3 12:14:50 2005

This archive was generated by hypermail 2.1.8 : Thu Feb 03 2005 - 12:14:50 CET