-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TAP works much slower than standard ArgumentParser #45
Comments
Hi @Enolerobotti, Thank you for bringing this to our attention! Yes, the slow part is the source code inspection in order to extract the help strings from comments. In our machine learning workflows, we find this overhead to be acceptable, but we can imagine that certain applications may need a faster argument parser. In the future, we will add a flag to disable this. Concretely, we would skip this call: typed-argument-parser/tap/tap.py Line 93 in 0dc69b3
Best, |
Hi @martinjm97, Thank you for your reply! Cheers, |
That makes sense! I didn't think a --Jesse |
Encountering the same issue, but now it seems like the class variables are being used on line 72 in
and on line 298 in
As that variable is now also being used for ordering, is it now not possible to make this change as noted above? |
TAP works very slow:
to reproduce
tap_parser: 0.050 seconds (tap 1.6.1)
tap_parser: 0.042 seconds (tap 1.4.3)
arg_parser: 0.000 seconds
The most time consuming actions are
ncalls tottime percall cumtime percall filename:lineno(function)
7754 0.013 0.000 0.032 0.000 /home/artem/.conda/envs/rdclone/lib/python3.6/tokenize.py:492(_tokenize)
7148 0.006 0.000 0.006 0.000 {method 'match' of '_sre.SRE_Pattern' objects}
I assume these two involve regular expressions.
Environment
Ubuntu 20.04.2 LTS
Python 3.6.10
conda 4.9.2
profilehooks 1.12.0
The text was updated successfully, but these errors were encountered: