Skip to content

Gateway: too many CoreAPI.ResolvePath calls #233

@Jorropo

Description

@Jorropo

Here is a trace I captured from loading dist.ipfs.io's favicon (on v0.8.0-rc2):
Capture d’écran du 2023-03-29 05-52-07

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.
Capture d’écran du 2023-03-29 05-58-33

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions