[C++-sig] Loading Boost.Python made bindings is horribly slow?
s_sourceforge at nedprod.com
Sat Apr 3 00:22:35 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
On 2 Apr 2004 at 14:06, Jonathan Brandmeyer wrote:
> Now, the only function that is exported is extern "C" initcvisual()
> and the resulting cvisual.so file size is very significantly reduced.
> (from about 3MB to 1.5 MB for me). You have to add the option
> -Wl,--version-script=$(MAPFILE_NAME) to the link command when invoking
> the linker via G++ to make use of this file.
Useful trick this - thanks for pointing it out. It took me some time
(GNU ld seems very finickity about the grammar being exactly broken
in the right places) but I got this:
As I patch Boost.Python in various places to enable multithreading
support, it makes sense to bundle my patched BPL with the bindings.
This is why I needed to work out how to specify C++ identifiers.
This method is not perfect on anything more varied eg; a general
purpose library. Studying the dynamic symbol table using "nm -C -D
<sofile>" shows symbols which match the wildcards leak out in a
chance-like fashion. What we really need is Windows-style specifiers
embedded directly into the source.
If I get some time this week, I may give a bash at patching GCC. Then
we can simply reuse the macros defining Windows DLL support to do the
same on POSIX.
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 126.96.36.199 / 9-2003 + PGP 8.0.2
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig