You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be the way to make HTTP2 at least as efficient as bundling, thereby obsoleting bundlers. If push allows us to send all assets that we need for a request at once, then imagine the efficiency gains. How we do this would be by analyzing the dependency graph of the current script being requested. This would only work for es modules, but I think that is the future and that is okay. There are tools available I believe that will allow us to get all of the dependency information that we need for a module. We could then grab and transpile all of the dependencies, and server push them to the client, thus hopefully saving many round-trips as the browser does not have to request files individually as the module is being parsed and its dependencies fetched on the client. One problem I see is that HTTP2 is not currently supported by this library. This library is just HTTP1, assuming that you'll have some kind of other wrapper to provide HTTP2/SSL support. That works really well with Dokku...but we might just have to change that and make this thing production ready stand-alone. This could be it. We should run benchmarks to prove its efficiency, and read through and disprove all of the articles that say HTTP2 does not obsolete bundling (most specifically I'm thinking about the Khan Academy article).
Actually, as long as we can set the HTTP2 push headers from an HTTP1 server, which Zwitterion is currently, then we can probably keep Zwitterion a simple HTTP server. That would require that people use an HTTP2 proxy to Zwitterion... We'll have to think about the best thing to do. I like the modularity and loose coupling that Zwitterion is currently, but it might be very inconvenient for people to have to set up their own HTTP2 proxy server. Look for existing projects that could make this easier for people.
I don't think we need to worry about this, since the static build will be used for production...perhaps come back to this in the future if it comes up, but the server is just for development...actually, maybe the static build could grab all of the imports and create a file that should be used to create an HTTP2 push header...yes, look into that
Metrics for HTTP2 with bundling, versus no bundling, versus server push
We need to prove that Zwitterion is performant before we can truly say it is better than Webpack in most situations.
Write article analyzing performance
Find a real world application with hundreds to thousands of es modules. Determine appropriate metrics for performance testing. Test multiple types of bundled code. Test statically built code with all http2 stuff, service workers, etc. If results are favorable, write article and promote results. Let Kent Dodds know
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: