Skip to content

Search: caching for faster startup #5391

@nnmm

Description

@nnmm

Context

In our docs, it takes about 5 seconds for the search plugin to become ready.

Description

Currently, the search index input is requested and indexed on every page load. Instead, the final search index could be kept in local browser storage and loaded from there if the search index input can be determined to be the same.

Related links

Use Cases

The user would need to provide a version identifier (e.g. git SHA, release number) that will be used as the cache key. Alternatively, material could compute a hash of the docs itself, though I'm not sure how realistic that is.

The advantages would be reduced bandwidth usage and less delay until the search plugin is ready.

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions