Closed ajhager closed 8 years ago
Three thoughts:
Also 3. Part of my playground work is to make a command that lets you generate a playground archive with whatever packages you would like.
Until then, users of the playground shouldn't have to implement an interface to, for example, Websockets just to explore them.
Well, they don't have to, since js
package is there. But once you're used to using the dom
or websocket
packages (and all your local code uses them), it is annoying having to fall back to rewriting it the raw low-level js
calls. For me, it's often a deterrent that stops me from using the playground for a particular small experiment.
Sorry for the noise @neelance. The pause was indeed from the processing, not the requests. It is clear you have put a lot of thought and work into the playground. I may come back to this later after the new features are done.
No problem. It's good that you are looking into these kinds of issues. :-)
Still a problem with HTTP/2 being a thing?
I think having packages be separate files is actually benefitial if we're using HTTP/2.
For that we need to support HTTPS and HTTP/2 on server. I know it's easy when hosting your own site with Let's Encrypt and a Go web server, but now sure about GitHub Pages.
Nevertheless, the difference between the two approaches is not very significant, and HTTP/2 is the future, so I think it's fine to assume we'll eventually have it. So there's no point in trying to switch to one large file now.
I'll close this because of above, but if someone has additional thoughts, feel free to comment or reopen.
There is a noticeable pause when loading the Playground, where an XHR request is being fired off for every .a file. While this is happening, the UI is frozen. It should be possible to gzip all of them and use just one request.