Hi Xin,

On Sat, Feb 15, 2014 at 9:32 PM, Xin Zhao <usfre...@gmail.com> wrote:

> Hey,
>
> I am trying to build a test tool using comtypes and mshtml to handle some
> applications that have IE activex control, which renders some logics
> predefined in an HTML file. But I have two issues:
>
>
>    1. I did "from comtypes.client import GetModule" and then
>    "GetModule('mshtml.tlb')". It took a few minutes to finish this function.
>    The second run was faster, but still took about 6 seconds. Is this normal?
>
>
mshtml.tlb is huge. It is expected to take a while to generate the module
the first time, though "a few minutes" seems excessive. Its sheer size is
probably enough to lead to slow imports after the module is generated on
the first load.



>
>    1. I usee comtypes to get IHTMLDocument2 interface, and then enumerate
>    all HTML elements in the application. But for some page, it took more than
>    2 minutes to process. This seems to be way too slow. I think I must miss
>    something. But have no clue about it.
>
> How many HTML elements were being enumerated? I am not familiar with this
interface, iterating over a large number of items and creating auxiliary
objects, or copying basic types, can be slow.

Regards,

Chris
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to