Skip to content
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

~400ms latency problems #26

Open
scottlingran opened this issue Jun 5, 2015 · 1 comment
Open

~400ms latency problems #26

scottlingran opened this issue Jun 5, 2015 · 1 comment

Comments

@scottlingran
Copy link

I noticed a parse through the json-rpc takes 400ms longer than using the java interactive shell.

What's the best way to cut this down? Is it a python issue?

Happy to work on this for a pull request.

@scottlingran
Copy link
Author

On further trial/error, it seems this is the line making it slow

https://github.com/dasmith/stanford-corenlp-python/blob/master/corenlp.py#L189-L193

while True:
  try:
    self.corenlp.read_nonblocking (4000, 0.3)
  except pexpect.TIMEOUT:
    break

Commenting it out reduces the the response time to ~130ms

Not sure what the purpose is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant