Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Await the service worker #264

Open
CryZe opened this issue Feb 21, 2020 · 2 comments
Open

Await the service worker #264

CryZe opened this issue Feb 21, 2020 · 2 comments
Labels
enhancement A new feature or general improvement to LiveSplit One. needs further discussion / research There's further design decisions that need to be made in order to continue. performance Performance is suboptimal and should be improved. suitable for contributions An issue that is suitable to tackle for someone new to the repository.

Comments

@CryZe
Copy link
Collaborator

CryZe commented Feb 21, 2020

At the moment we are setting up the service worker and in the meantime already await the imports. The problem with this is that the service worker will have to download everything as well, so on a completely clean set up, you are downloading everything twice at the moment.

@CryZe CryZe added enhancement A new feature or general improvement to LiveSplit One. suitable for contributions An issue that is suitable to tackle for someone new to the repository. performance Performance is suboptimal and should be improved. labels Feb 21, 2020
@wooferzfg
Copy link
Member

I'm not sure how we can actually do this. The promise returned by navigator.serviceWorker.register seems to resolve before all the actual file caching happens.

@CryZe
Copy link
Collaborator Author

CryZe commented Mar 9, 2020

I believe part of the problem here could be that locally we request a different URL than the service worker does (the service worker includes some hash in the URL), so the normal browser cache considers it a cache miss and does another request. I'm pretty sure we can easily change the configuration of our service worker to not do that, if that is indeed the problem.

@CryZe CryZe added the needs further discussion / research There's further design decisions that need to be made in order to continue. label Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or general improvement to LiveSplit One. needs further discussion / research There's further design decisions that need to be made in order to continue. performance Performance is suboptimal and should be improved. suitable for contributions An issue that is suitable to tackle for someone new to the repository.
Projects
None yet
Development

No branches or pull requests

2 participants