Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #95357

Re: Module load times

From "Joseph L. Casale" <jcasale@activenetwerx.com>
Subject Re: Module load times
Date 2015-08-13 21:12 +0000
References <mqiq69$n8p$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.177.1439500385.3627.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Module load times "Joseph L. Casale" <jcasale@activenetwerx.com> - 2015-08-13 21:12 +0000
  Re: Module load times Steven D'Aprano <steve@pearwood.info> - 2015-08-14 12:10 +1000
    RE: Module load times "Joseph L. Casale" <jcasale@activenetwerx.com> - 2015-08-14 02:25 +0000
    Re: Module load times Chris Angelico <rosuav@gmail.com> - 2015-08-14 12:38 +1000

csiph-web