-
Notifications
You must be signed in to change notification settings - Fork 1
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
Isolate and remove performance issues (should be no blocking async/await in ctx.do) #32
Comments
Yah ... I'm sure this code is a key contributor ... we shouldn't be doing anything like this in ctx.do because it adds 200ms+ of latency to every request, many of which are normally < 10ms ... if there is something like this, we could do a ctx.waitUntil to fetch it in the background, and leave it in memory so it could be retrieved and optimistically incremented on future requests ... but yah, we can't have any blocking requests like this in ctx.do code ...
|
I temporarily commented out the above code and the |
Yes, I just re-ran the perf tests and they dramatically improved:
and
from:
This means that ctx.do is adding 3-4ms of latency to the request ... which isn't horrible, but we should see if we can get it > 1ms or at least 1-2ms if at all possible ... |
I noticed many of our services had slowed WAY down vs normal:
My hypothesis was that something in ctx.do was slowing it down, so I made a test in
api.cf
:and that increased performance by 2000% ... so we need to isolate and resolve whatever is introducing slowness. We should make sure we aren't doing anything async/await to block the thread ... ctx.do should be instant ... my initial suspicion is that this is related to the Analytics Engine stuff we added on Friday.
The text was updated successfully, but these errors were encountered: