Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Service worker rebuilds gets increasingly slower despite being reportedly fast #903

Open
@jakobrosenberg

Description

@jakobrosenberg

Describe the bug
After a fresh start of npm run dev Sapper is fast and there's no delay between client and service worker finishing their rebuilds. However the longer Sapper runs, the slower the rebuild of the service worker gets. After a while the delay between client and service worker being rebuilt increases to over 10+ seconds. Despite the long rebuild time, the service worker reports its rebuild time to be only ~50 ms.

✔ server (902ms)
✔ client (1.2s)  
//increasing delay here up to +10 secs
✔ service worker (40ms)

Logs
The logs show that the build times are normal. Service worker is shown to have been rebuilt in ~50 ms even though it can take more than 10 seconds.

To Reproduce
I have no idea how to reproduce it, but I've experienced it a few times on different projects.

Information about your Sapper Installation:

  • Your operating system: Windows 10 x64

  • Your hosting environment: local

  • Sapper version: 0.27.8

  • Svelte version (Please check you can reproduce the issue with the latest release!)
    3.9.1 and 3.12.1

  • Whether your application uses Webpack or Rollup
    Rollup

Severity
It's not breaking in any way, just annoying as it breaks the flow of development.

Additional context
The problem goes away if I stop Sapper restart it with npm run dev
I could probably solve this on my own, but I wouldn't know where to start. client and service worker both shows fast build times, yet there's a long delay between them. Can I debug the rebuild process for further information?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions