COM Server data from python

schapman1974 at gmail.com schapman1974 at gmail.com
Wed Apr 2 09:39:01 EDT 2014


  I am attempting to provide a bit of data through a com server I did a comparison of speed of my COM interface to ADODB and It seems massively slower.  I'm not sure if there is something I need to adjust or maybe that I am making so many calls to the COM server that each call takes time and possibly ADO is just buffering some data in chunks to my code.  This is mainly for an excel add-on that has not possibility to connect to mongodb except through an interface like this.

  I thought it was not really a big deal until I tested larger amounts of data and the speed took a nose dive.  For instance 10,000 records just to walk through and pull a couple fields.  ADO on the exact same data took only 1.5 seconds where my python code took close to 58 seconds to do the same thing.  I've played around with design etc.

  When i test the same code directly from python I get the same result if not better than I did with ADO.  Is there some bit of COM magic that I am missing.  Or is this because python is having to do more behind the scenes?

Thanks



More information about the Python-list mailing list