Need to improve print_control_identifiers() performance with depth param
See original GitHub issueI’ve observed very slow behavior for iTunes (tab “Store”).
>>> len(app.iTunes.descendants()) # takes ~2.5-3 sec.
3024
>>> len(app.iTunes.children()) # takes less than 0.1 sec.
5
app.iTunes.print_control_identifiers()
takes more than a minute! Couldn’t wait it for a reasonable time. Even if I set argument depth=1
.
I think we need to improve this at least for some constrained depth value.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
pywinauto Documentation - Read the Docs
print_control_identifiers() gets bytes string on Python 3.x. – Importing pywinauto causes debug messages to appear twice. • Improved click ...
Read more >pywinauto.application module - Read the Docs
The application module is the main one that users will use first. When starting to automate an application you must initialize an instance...
Read more >pywinauto 0.6.5 documentation - 一译
print_control_identifiers() gets bytes string on Python 3.x. Importing pywinauto causes debug messages to appear twice. Improved click methods behaviour for ...
Read more >sitemap-questions-21.xml - Stack Overflow
... .com/questions/4557387/is-a-url-query-parameter-valid-if-it-has-no-value ... /questions/19618105/how-to-improve-performance-of-geoip-query-in-bigquery ...
Read more >Pywinauto unintended result when initiating button control ...
I have modelled my code similarily to the answer provided in this question: ... dlg.print_control_identifiers().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The cause is
UIAWrapper.__hash__
method. https://github.com/pywinauto/pywinauto/blob/master/pywinauto/controls/uiawrapper.py#L198 A lot of controls don’t have RuntimeId field, so mapping dictionary out of controls in order to build control tree takes a very long time. Typical item in iTunes app looks like this:This issue as it was submitted initially is fixed in
atspi
branch by PR #1049. Let’s continue other optimization topics in #256.