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

The calling time of function pezzo.get_prompt() is too long #232

Open
Undertone0809 opened this issue Oct 10, 2023 · 1 comment
Open

The calling time of function pezzo.get_prompt() is too long #232

Undertone0809 opened this issue Oct 10, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Undertone0809
Copy link

Proposal

Here is my code:

from pezzo.client import pezzo
import time

start_time = time.time()
res = pezzo.get_prompt("001")
duration = time.time() - start_time
print(duration)
res = pezzo.get_prompt("001")
duration = time.time() - start_time
print(duration)
res = pezzo.get_prompt("001")
duration = time.time() - start_time
print(duration)

Here is result:

1.151733636856079
2.3014795780181885
3.4458425045013428

The calling time of function pezzo.get_prompt() is too long. On average, it takes about a second to call and obtain a prompt. This speed is not suitable for production.

So where is the main time spent? Can you still optimize it, or is it mainly a problem with my network environment? I would like to know the average speed of your calls to rule out my personal network issues.

Use-Case

Optimize calling time.

Is this a feature you are interested in implementing yourself?

No

@arielweinberger
Copy link
Member

Hi @Undertone0809 I'll investigate this. Definitely shouldn't take so long! I'll try to tackle this today and share the benchmarks here before proceeding to a solution. Really appreciate you reporting this.

@arielweinberger arielweinberger added bug Something isn't working and removed feature-request labels Oct 10, 2023
@arielweinberger arielweinberger self-assigned this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants