Module load times

Joseph L. Casale jcasale at activenetwerx.com
Thu Aug 13 23:12:58 CEST 2015


Hi Stefan,

> How is the DLL binding implemented? Using "ctypes"? Or something else?

It is through ctypes.

> Obviously, instantiating a large ctypes wrapper will take some time. A
> binary module would certainly be quicker here, both in terms of import time
> and execution time. Since you're generating the code anyway, generating
> Cython code instead shouldn't be difficult but would certainly yield faster
> code.

True, I was using XSLT to auto generate the module. I will however explore this.

> What makes you think the import might be a problem? That's a one-time
> thing. Or is your application a command-line tool or so that needs to start
> and terminate quickly?

The code is used within plugin points and soon to be asynchronous code
(once  the original broken implementation is fixed) where in some cases it
will be instantiated 100's of 1000's of times etc...

Thanks,
jlc


More information about the Python-list mailing list