Replies: 2 comments 2 replies
-
Can you reproduce this using hyper directly without axum? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Just another note: sometimes the request comes back in under a few milliseconds, which I'd expect, but mostly it is ~250-300ms, even for the same content. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
SOLVED It is a Tokio problem/misunderstanding/me butchering all that is good and holy in Tokio!
TLDR: Hi there - how would I go about nailing down timings outside of my handler in mode?
I have a handler that completes within 1ms, however, Chrome shows it takes ~300ms (all localhost):
![image](https://user-images.githubusercontent.com/181469/189539050-4790a5a2-8e2e-465a-a1c3-4967e1c8f613.png)
When I look at where Chrome is waiting, it is pretty much all in "waiting to download":
![image](https://user-images.githubusercontent.com/181469/189539070-b88aa4cc-af9a-4f3e-9c9c-61014fa5efcc.png)
The response is a few KB of JSON, which is returned by:
I don't have anything "funky" going on, but I do have:
Arc<Mutex<SomeThing>>
To my mind, the performance is about 299ms too long :-). Any idea where I should start looking for these extra milliseconds?
Thanks!
*EDIT: I have other handlers where axum is no more than 1 or 2 ms overhead, and others which are also 100s of miliseconds more than the handler
*EDIT: it exhibits the sae performance in both RELEASE and DEBUG
Beta Was this translation helpful? Give feedback.
All reactions