Skip to content

fix: use less indexedDB in service worker #810

@SgtPooki

Description

@SgtPooki

reading from indexedDB in the service worker causes a slight performance hit, but we should be able to store state in a service worker response cache.

We have a few different places where we need to load the config (hits IDB) or get the installTimestamp, or accept origin isolation warning, or potentially others.

This may be called on every new fetch event, but we can get a minor speedup and reduce SW bundle size by migrating away from indexedDB and using a response cache.

This should improve coldstart (firsthit) by at least a few 10s or 100s of milliseconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps upneed/analysisNeeds further analysis before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions