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
Allow PLY to generate parsing/lexing tables. #63
Conversation
A small change is required for pyinstaller. I made the changes locally and can push them to your branch if it's ok. |
@glx22 Yes, please go ahead. :-) |
I tested this with Iron Horse and --verbosity=4 flag. Python is 3.5. Results:
|
Hmm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggested changes fix the develop
issue
cd37ef9
to
1caaa30
Compare
...and modify setup.py to create them at build time. On my laptop, pre-generated tables reduce the time spent in `NMLParser.__init__()` from 2.2s to 0.2s, halving the total runtime of nmlc for small input files. PLY will attempt to regenerate these automatically at runtime if the grammar has changed. In the case where they're system-installed and not writeable, the grammar is also system-installed and not writeable. :P This patch includes changes suggested by glx22.
1caaa30
to
02877cf
Compare
...and modify setup.py to create them at build time.
On my laptop, pre-generated tables reduce the time spent in
NMLParser.__init__()
from 2.2s to 0.2s, halving the total runtimeof nmlc for small input files.
PLY will attempt to regenerate these automatically at runtime if the
grammar has changed. In the case where they're system-installed and not
writeable, the grammar is also system-installed and not writeable. :P