Re: Recursion Performance Question

2008-07-24 Thread Anders J. Munch
B wrote: > > # pass in window handle and parent node > def gwl(node, hwnd): > if hwnd: > yield node, hwnd > for nd, wnd in Wnd.gwl(node.children[-1], GetWindow(hwnd, > GW_CHILD)): > yield nd, wnd > for nd, wnd in Wnd.gwl(node, GetWind

Re: Recursion Performance Question

2008-07-24 Thread Tim Golden
B wrote: Now it works, but it runs quite slow (compared to the c++ app). I changed gwl from strait recursion to use a generator and that helped, but it still takes 0.5-1.0 seconds to populate the tree. What I'm wondering is am I doing it in a really inefficient way, or is it just python? W