Skip to content

Faster gateway directory listings #8178

@Stebalien

Description

@Stebalien

Update 11/4(@schomatis): We need to refactor the gateway code to use UnixfsAPI.Ls() instead of Get.

Instead of resolving file types up-front in the gateway, we can take advantage of streaming HTML rendering (most browsers support this) by:

  1. Returning an HTML body with the directory listing as fast as possible.
  2. Streaming back some trailing style elements to "update" the directory listing with file types.

That way the directory listing appears immediately, and icons for file-types will be filled in as new <style> elements get sent back to the browser.

Alternatively, we could do this with some javascript. But I'd like to avoid that if possible.

Metadata

Metadata

Assignees

Labels

P3Low: Not priority right noweffort/daysEstimated to take multiple days, but less than a weekexp/intermediatePrior experience is likely helpfulhelp wantedSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing featuretopic/gatewayTopic gateway

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions