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

Use shared worker to avoid the warm up time when you open a new tab #58

Open
alfonsogarciacaro opened this issue Oct 19, 2018 · 2 comments

Comments

@alfonsogarciacaro
Copy link
Member

Sometimes you need to use multiple tabs in the REPL when you're trying different things or opening multiple shared URLs. In those cases, it's a bit tedious to wait the 5-6 seconds every time until being able to use the REPL.

It shouldn't be too difficult to turn the current worker into a shared worker so it can be reused in multiple browser tabs. I'll look into this.

@MangelMaxime
Copy link
Member

We need to be careful about multi tab scenario because we are saving the code in the localstorage and so each tab is erasing each other.

Even with multiple workspace we will need to find a way to limit this problem. I think we can gain à unique id per tab to identify them.

@alfonsogarciacaro
Copy link
Member Author

Using a unique id for each tab is a great idea! We should also add the timestamp so, in case there's nothing saved with that id, the REPL will load the most recent data (at this point we should start thinking about IndexedDb instead of localStorage).

Also my idea is that, as soon as users start to get serious with their work, they must set a project name, that will become the id when saving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants