Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'broken': 0.03; 'true,': 0.04; 'binary': 0.05; 'problem?': 0.07; 'wrapper': 0.07; 'instantiated': 0.09; 'ctypes.': 0.16; 'etc...': 0.16; 'obviously,': 0.16; 'received:172.18.0': 0.16; "shouldn't": 0.18; 'to:name:python-list@python.org': 0.20; 'to:2**1': 0.21; 'ctypes': 0.22; 'terminate': 0.22; 'code.': 0.23; 'thanks,': 0.24; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'points': 0.27; 'dll': 0.27; 'module.': 0.27; 'yield': 0.27; 'this.': 0.28; 'command-line': 0.29; 'code': 0.30; 'certainly': 0.30; 'execution': 0.35; 'something': 0.35; 'but': 0.36; 'instead': 0.36; 'tool': 0.36; 'cases': 0.36; 'faster': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'application': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'your': 0.60; 'times': 0.63; 'within': 0.64; 'soon': 0.65; 'binding': 0.66; 'one-time': 0.66; '(once': 0.84; 'quicker': 0.84; 'quickly?': 0.84; 'subject:times': 0.84; 'xslt': 0.84 X-Authority-Analysis: v=2.1 cv=FsfPhTfq c=1 sm=1 tr=0 a=g3mLq75WYuDrh3Lt0JSDww==:117 a=g3mLq75WYuDrh3Lt0JSDww==:17 a=QC7fh9NfAAAA:8 a=5pFAO2ZBLFIA:10 a=8nJEP1OIZ-IA:10 a=uRRa74qj2VoA:10 a=Nr-xCcDEoW9WbOTMOxEA:9 a=wPNLvfGTeEIA:10 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.activenetwerx.com X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=RDNS_NONE autolearn=no autolearn_force=no version=3.4.0 From: "Joseph L. Casale" To: Stefan Behnel , "python-list@python.org" Subject: Re: Module load times Thread-Topic: Module load times Thread-Index: AQHQ1ej8wFn1zD8Vfk6np2iCbXgpwp4KsKgA//+71vU= Date: Thu, 13 Aug 2015 21:12:58 +0000 References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [72.29.233.193] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CMAE-Envelope: MS4wfAqFQWA4sGe+RJzO9pHrdefYGmOKYWXbi7aaUyPQYcV3pTDJ4UlEoF2rUdC0dPcWXPaWX9Me9gJ3GuYA9e5bZ1A7mnk7benfozGO1MN2GfogB2XWdQxigfVusu4/bUhlgCcinJjBRO3P6iWB+6ml6rwow+IFG0gKVQ4mb4nd1TAqC95uEsoJw5ruOMHBLTD/0A== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1439500385 news.xs4all.nl 2835 [2001:888:2000:d::a6]:36633 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95357 Hi Stefan,=0A= =0A= > How is the DLL binding implemented? Using "ctypes"? Or something else?=0A= =0A= It is through ctypes.=0A= =0A= > Obviously, instantiating a large ctypes wrapper will take some time. A=0A= > binary module would certainly be quicker here, both in terms of import ti= me=0A= > and execution time. Since you're generating the code anyway, generating= =0A= > Cython code instead shouldn't be difficult but would certainly yield fast= er=0A= > code.=0A= =0A= True, I was using XSLT to auto generate the module. I will however explore = this.=0A= =0A= > What makes you think the import might be a problem? That's a one-time=0A= > thing. Or is your application a command-line tool or so that needs to sta= rt=0A= > and terminate quickly?=0A= =0A= The code is used within plugin points and soon to be asynchronous code=0A= (once the original broken implementation is fixed) where in some cases it= =0A= will be instantiated 100's of 1000's of times etc...=0A= =0A= Thanks,=0A= jlc=0A=