By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

makepy, ADO and dynamic.py

P: n/a
I'm trying to track down a performance issue in my Windows code, and
hotshot is telling me that the most time and calls are spent in these
methods

ncalls tottime percall cumtime percall filename:lineno(function)
75975 63982.779 0.842 124464.419 1.638
c:\python24\lib\site-packages\win32com\client\dynamic.py:285(_make_meth od_)
71294 47871.424 0.671 50629.224 0.710
c:\python24\lib\site-packages\win32com\client\__init__.py:444(_ApplyTyp es_)

If I understand correctly, running makepy on the appropriate COM class
should get rid of the dynamic stuff and let it be called directly. I
use ADODB to talk to my database server, and I've run makepy for
"Microsoft Active X Data Objects 2.8 Library" [1] and on "Microsoft
ActiveX Data Objects Recordset 2.8 Library", but I'm still seeing the
call to the dynamic.py class.

Am I right that seeing the calls in "dynamic.py" implies that I'm
running "makepy" on the wrong thing? Any idea what I should be running
makepy on?

[1] I seem to have a bunch of versions of "Microsoft ActiveX Data
Objects Library", is there a chance that another ADO library is being
used?

Sep 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Chris Curvey" <cc*****@gmail.comwrote in message news:11**********************@i42g2000cwa.googlegr oups.com...
I'm trying to track down a performance issue in my Windows code, and
hotshot is telling me that the most time and calls are spent in these
methods

ncalls tottime percall cumtime percall filename:lineno(function)
75975 63982.779 0.842 124464.419 1.638
c:\python24\lib\site-packages\win32com\client\dynamic.py:285(_make_meth od_)
71294 47871.424 0.671 50629.224 0.710
c:\python24\lib\site-packages\win32com\client\__init__.py:444(_ApplyTyp es_)

If I understand correctly, running makepy on the appropriate COM class
should get rid of the dynamic stuff and let it be called directly. I
use ADODB to talk to my database server, and I've run makepy for
"Microsoft Active X Data Objects 2.8 Library" [1] and on "Microsoft
ActiveX Data Objects Recordset 2.8 Library", but I'm still seeing the
call to the dynamic.py class.

Am I right that seeing the calls in "dynamic.py" implies that I'm
running "makepy" on the wrong thing? Any idea what I should be running
makepy on?

[1] I seem to have a bunch of versions of "Microsoft ActiveX Data
Objects Library", is there a chance that another ADO library is being
used?
The most reliable way to make sure the generated support is used is
to call win32com.client.gencache.EnsureDispatch. If a typelib can
be found, the corresponding python module will be created if it doesn't
already exist.

Roger
Sep 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.