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

soften language for d/l time saved, + GZip note #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomByrer
Copy link

https://github.com/substack/browserify-handbook#window-globals

This approach tends to be very slow since each script tag initiates a new round-trip http request...
loads much faster because only a single http request for a single script tag needs to execute

Honestly, I think improved speed depends on the resources needed for the app & loading order. A few external resources hosted on a CDN or separate server (with unique originating URL) could load concurrently, thanks to most browsers having spare Max Connections. A browserified/concocted chunk may have to wait for open HTTP connection, since "Connections per Hostname" has a smaller cap. True, an extra HTTP lookup is needed, but lookup time can be reduced, & IP &/or file may be cached already.|
I did note the extra GZip reduction. But even at best 10 browserified files may save 10 HTTP packets, likely 5, so a few Kilobytes?
Since there are so many variables, I softened the language of the impact.

I'm willing to see some hard proofs either way.

https://github.com/substack/browserify-handbook#window-globals
>This approach tends to be very slow since each <script> tag initiates a new round-trip http request.
> loads much faster because only a single http request for a single <script> tag needs to execute

Honestly, I think this depends on the resources needed for the app & loading order.  A few external resources hosted on a CDN or separate server (with unique originating URL) could load concertedly, thanks to most browsers having extra [Max Connections](http://www.browserscope.org/?category=network&v=top).  A browserified/concocted chunk may have to wait for open HTTP connection, since "Connections per Hostname" has a smaller cap.  True, an extra HTTP lookup is needed, but lookup time [can be reduced](https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching), & IP &/or file may be cached already.|
I did note the extra GZip reduction.  But even at best 10 browserified files may save 10 HTTP *packets*, likely 5, so a few Kilobytes?
Since there are so many variables, I softened the language of the impact.

I'm willing to see some hard proofs either way.
@ghost
Copy link

ghost commented May 19, 2014

It's more about latency because on lousy conections like 3g each round-trip can be really costly.

@wilmoore
Copy link

Also, loading tons of script tags on a resource limited set-top-box can be a nightmare.

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

Successfully merging this pull request may close these issues.

2 participants