471,305 Members | 1,272 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,305 software developers and data experts.

makepy, ADO and dynamic.py

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
1 1377

"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.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.