Re: [OpenBabel-Devel] Why are there plugins?

2020-01-10 Thread Noel O'Boyle
Here are some timings for "obabel -:C -osmi" for the first run of the day
(note that OB here is on a network drive so I would guess this will be
slower than for most other people):

real 0m1.981s
user 0m0.029s
sys 0m0.086s

and the second:

real 0m0.032s
user 0m0.020s
sys 0m0.010s

Personally, I don't see this as a problem, and I have no interest in making
a complex system even more complex.

Regards,
- Noel


On Wed, 8 Jan 2020 at 18:53, Geoffrey Hutchison 
wrote:

> > In theory one could load only the plugins needed and in that way save
> startup time and memory. However in OB, once you load one plugin all
> plugins are loaded (one by one, making it slow).
>
> Sounds like a great project. If you or anyone else wants to improve the
> plugin loading code to load on demand, please let me know.
>
> Open Babel is a purely volunteer project, so features are added / coded
> when people have a need and write the code.
>
> It's been ages since I benchmarked the plugin loading code (i.e., well
> over 10 years) but my conclusion back then was that:
> - it's a meaningful time delay for short tasks, but those are fast anyway
> - when you're repeating short tasks (e.g., using the obabel binary
> repeatedly in a shell script) most of the plugins get cached by modern OS
> - for long tasks, it's not the time-limiting step
>
> There were two reasons for them:
> - they're much easier to write than adding to a monolithic library. (Does
> anyone want 100 API calls for different formats, etc.?)
> - they can be offloaded as needed by the OS
>
> I'm sure someone could code up an index/cache to improve plugin loading.
> Please do.
>
> In the meantime, as you note, it's possible to compile static and/or hack
> the build as you wish.
>
> -Geoff
>
> ___
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>
___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel


Re: [OpenBabel-Devel] Why are there plugins?

2020-01-08 Thread David van der Spoel

Den 2020-01-08 kl. 15:18, skrev Noel O'Boyle:
If you delete all of the plugins you don't want, this will speed things 
up for you.


Alternatively, if you make a static build (I forgot the precise 
invocation), then the plugins are compiled in rather than loaded 
dynamically.

cmake -DBUILD_SHARED=OFF indeed solves my problems, thanks!

However it would be good to discuss the rationale for plugins and 
whether the (complex) implementation serves its purpose.




I don't have time right now to go into why plugins are a great idea, but 
hopefully the suggestions above will sort out your immediate problems.


Regards,
- Noel

On Wed, 8 Jan 2020 at 13:51, David van der Spoel > wrote:


Hi,

I am trying to debug some code that links to OpenBabel and wonder why
there are plugins for everything?

In theory one could load only the plugins needed and in that way save
startup time and memory. However in OB, once you load one plugin all
plugins are loaded (one by one, making it slow).

So is there any rationale for these or should we phase them out?

Cheers,
-- 
David van der Spoel, Ph.D., Professor of Biology

Head of Department, Cell & Molecular Biology, Uppsala University.
Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205.
http://www.icm.uu.se


___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/openbabel-devel




--
David van der Spoel, Ph.D., Professor of Biology
Head of Department, Cell & Molecular Biology, Uppsala University.
Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205.
http://www.icm.uu.se


___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel


Re: [OpenBabel-Devel] Why are there plugins?

2020-01-08 Thread Michael Banck
Hi,

On Wed, Jan 08, 2020 at 02:18:13PM +, Noel O'Boyle wrote:
> If you delete all of the plugins you don't want, this will speed things up
> for you.

That might not be possible for users that got OpenBabel installed by
their admins though.


Michael


___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel


Re: [OpenBabel-Devel] Why are there plugins?

2020-01-08 Thread Noel O'Boyle
If you delete all of the plugins you don't want, this will speed things up
for you.

Alternatively, if you make a static build (I forgot the precise
invocation), then the plugins are compiled in rather than loaded
dynamically.

I don't have time right now to go into why plugins are a great idea, but
hopefully the suggestions above will sort out your immediate problems.

Regards,
- Noel

On Wed, 8 Jan 2020 at 13:51, David van der Spoel 
wrote:

> Hi,
>
> I am trying to debug some code that links to OpenBabel and wonder why
> there are plugins for everything?
>
> In theory one could load only the plugins needed and in that way save
> startup time and memory. However in OB, once you load one plugin all
> plugins are loaded (one by one, making it slow).
>
> So is there any rationale for these or should we phase them out?
>
> Cheers,
> --
> David van der Spoel, Ph.D., Professor of Biology
> Head of Department, Cell & Molecular Biology, Uppsala University.
> Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205.
> http://www.icm.uu.se
>
>
> ___
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>
___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel