Support lazy loading preinstalled Snaps
- Dominant language
- TypeScript
- Stars
- 853
- Forks
- 662
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 8
Description
Currently all preinstalled Snaps must be provided to the `SnapController` through the constructor, meaning all preinstalled Snaps must be fetched at app initialisation time. This may become problematic when there are many preinstalled Snaps, resulting in a long initialisation time.
We should consider allowing lazy loading of preinstalled Snaps. Instead of providing the full JSON, we can provide metadata for how the Snap should be fetched, and lazily fetch when the Snap is actually invoked for the first time (e.g., in `SnapController.startSnap`).
Contributor guide
Research direction
Start by reading the SnapController constructor and SnapController.startSnap, which the issue identifies as the relevant entry points. Trace how preinstalled Snap JSON is currently supplied and fetched, then define the metadata and lazy-fetch behavior needed when a Snap is first invoked; done means initialization no longer fetches every preinstalled Snap while invocation still obtains the required Snap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100