-
Notifications
You must be signed in to change notification settings - Fork 7
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
Very slow startup on tdcli #2
Comments
It's not actually StringIO's fault; the delay comes from assembling the lexer that parses the task string. Plex (the lexer library I'm using) only causes a delay of a couple of seconds on my machine, but I can see where it would take a lot longer under other conditions. I'll look into replacing plex with the built-in re.Scanner tool: http://www.evanfosmark.com/2009/02/sexy-lexing-with-python/. Thanks for the bug report! |
I've added a cache of the lexer object, so that once it's been generated it will be re-used between runs. It significanty improves performance on my machine. Can you please check it out and see if it helps on your end? |
Adam, That seemed to really pick things up. One other problem I am having Thanks, Rich On Fri, Nov 11, 2011 at 11:56 AM, Adam Compton
Rich |
Great idea! I've added that to the latest commit. Please try it out and let me know what you think. Thanks, |
The current code doesn't use the lexer (or its cache) anymore, and the other issue was addressed a year ago. Closing this ticket. |
Whenever, I launch tdcli, I am getting extremely slow startups, on the order of 30 seconds, even after I have authenticated completely. I am not sure what is causing the delay, but I have tried looking at python -v tdcli it it holds for most of the time after showing import StringIO.
When I import StringIO, or any of the other import commands I see when viewing the verbose log, I have no delay.
The text was updated successfully, but these errors were encountered: