-
Notifications
You must be signed in to change notification settings - Fork 100
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
Gateway: too many CoreAPI.ResolvePath calls #233
Comments
This looks like it could be the cullprit (if anything it at least expose the same bug): boxo/gateway/handler_unixfs__redirects.go Line 261 in 5bbb21b
This code should shift the last match into a variable while iteratively traversing the folders. I'll wait on #176 before doing anything. |
@Jorropo I think this has been solved in the meanwhile through the successive refactors. It seems like we only hit Namesys once now. I tried with a few different pages and only see a single call. Feel free to re-open if you still see many calls. |
Here is a trace I captured from loading
dist.ipfs.io
's favicon (onv0.8.0-rc2
):You can see that it loads the same ressource over and over, there is no point to restarting from
/ipns/dist.ipfs.io
all the time.Ideally once we resolve a path component we followup all future resolution from this path component or better.
They all endup calling into
namesys
.It doesn't look like the latency impact is very bad because all but the first call to ResolvePath and first call to
BlockAPI.Get
are very fast, so they are probably hitting a cache, it looks like a low hanging fruit that would reduce allocations and CPU usage a bit tho.The text was updated successfully, but these errors were encountered: