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

Preload playground when the extension starts #22

Closed
psrpinto opened this issue Sep 2, 2024 · 8 comments
Closed

Preload playground when the extension starts #22

psrpinto opened this issue Sep 2, 2024 · 8 comments

Comments

@psrpinto
Copy link
Member

psrpinto commented Sep 2, 2024

We should already load playground in the background as the app starts so that in the optimum case the user never sees the playground loading screen.

@psrpinto psrpinto mentioned this issue Sep 2, 2024
@psrpinto
Copy link
Member Author

I'm not sure we can do this because we don't know which "session" the user will open. I think we should close this in favour of making playground load faster (e.g. through #79).

Thoughts @ashfame ?

@ashfame
Copy link
Member

ashfame commented Oct 14, 2024

@psrpinto I guess depends on the speed of "Fresh setup" vs "resetting" of playground? With all local files (when WP + PG is bundled in extension itself), it's likely the diff would only come to execution, so not much. But when not bundled, I imagine resetting would be quite faster than a fresh setup?

@ashfame
Copy link
Member

ashfame commented Oct 14, 2024

Also #79 is for reliability of PG & its client to be in sync, not sure if there is a "speed" angle to it as well?

@psrpinto
Copy link
Member Author

Just to be clear, what I was suggesting was that we close this issue because we can't possibly know which session (aka playground slug) the user would want to load, and we need to know the slug before booting playground, so that we can pass it to Playground.

Given we cannot do what this issue suggests, we can address the problem in a different way, by making Playground load faster (the root of this issue is that Playground is "slow" so the user needs to wait for it to boot).

#79 would make it faster because playground and all the assets it needs (e.g. wp.zip) would be fetched from the extension itself, which would likely be much faster than fetching it over the network.

So I would just close this issue, we could revisit this in the future if users ask for faster loads.

@psrpinto
Copy link
Member Author

Sorry, #79 is not the issue I was thinking, I thought it was about bundling playground, but there is currently no issue for that.

@ashfame
Copy link
Member

ashfame commented Oct 14, 2024

Right, I made my comment considering a future where playground is still not bundled, in which case booting it up, even though we would likely reset it, might provide faster access to a PG instance since all network calls are already done at that point.

Right now, PG also always load a temporary playground even though it has a saved one.

So, this issue will be relevant (we can close now, and re-open later) if we decide not to bundle PG along with the extension.

@psrpinto
Copy link
Member Author

Ok, closing this one for now.

Right now, PG also always load a temporary playground even though it has a saved one.

I wasn't aware of this, should we open an issue?

@ashfame
Copy link
Member

ashfame commented Oct 14, 2024

I wasn't aware of this, should we open an issue?

I was describing playground.wordpress.net behavior. Not an issue for us :)

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