[C++-sig] Loading Boost.Python made bindings is horribly slow?
Stefan Seefeld
seefeld at sympatico.ca
Fri Apr 2 20:10:21 CEST 2004
Niall Douglas wrote:
> Is anyone else having this problem? I don't think it's BPL's fault
> really as on Windows it only takes a second or two so I'm guessing
> it's the dynamic linker. I'd imagine that that prebinding linkage
> feature of newer Linuces will fix this problem - in the meantime, any
> suggestions?
We experience the same: in our case it's already the linking of the
module that takes a long time because we split up the code into
multiple translation units.
> (Here's a thought - GCC outputs far too many symbols into the public
> ELF table - if GCC had a dllexport/dllimport mechanism like on
> Windows, the amount of symbols needing to be linked could be reduced
> very significantly indeed. As it so happens, someone submitted a
The simplest thing to do (in this particular context) is to put
everything into an anonymous namespace. Everything but the actual
python module init function ('BOOST_PYTHON_MODULE()'). That should
restrict the number of the exposed symbols to a strict minimum.
Stefan
More information about the Cplusplus-sig
mailing list