That discussion aside, you can still argue that requiring all the files
explicitly instead of implicitly is a win. Then you have an opportunity to
think if a file should or not go into a specific manifest.
Also, it makes it easier to understand which files are loaded and in which
order.
Best,
Brian-
You raise some great points and are moving into some bigger picture stuff about
how one actually writes Javascript.
In general (although there are some exceptions), having one large concatenated
JS file, properly GZIPed, pushed to an asset bucket (like Amazon), pulled from
a CDN (like
Sebastian Korfmann wrote:
>
>
> I've been wondering if the assumption of four asset hosts for the sake of
> speed improvements is still valid.
>
And Jeremy Kemper wrote:
> Domain sharding is still useful but our guidance is outdated. It's
> from a pre-SSL-everywhere, pre-SPDY era where browsers
Domain sharding is still useful but our guidance is outdated. It's
from a pre-SSL-everywhere, pre-SPDY era where browsers had low
per-domain connection caps.
http://www.stevesouders.com/blog/2013/09/05/domain-sharding-revisited/
http://blog.cloudflare.com/using-cloudflare-to-mix-domain-sharding-an
For sure, but it would be a relatively small file, wouldn't it? There's a
lot of (reasonable) concern about making multiple HTTP requests, but that's
usually when you're evaluating the performance of a single page. As you go
between pages you'd be just loading what you need.
Honestly it might
*## On Perf Changes*
Any performance improvements that have wide implications such as this, need
to be benchmarked before they could be merged.
It's not enough to do the research, we would need actual experimental proof
that it works, provides a significant speed boost to justify the extra code
c
Brian,
I think require_tree often leads to problems (it’s one of the first things I
remove when I’m building an app), but by loading specific JS files per page,
aren’t you denying your users’ browsers the opportunity to cache the JS from
other page visits? Separate per-page JavaScript files m
I posted an issue about this
( https://github.com/rails/rails/issues/17457#issuecomment-61292491 ) but
I'll copy/paste here for discussion convenience:
I feel like I'm the boy telling the emperor he has no clothes, but here
goes...
Every large rails project that I've worked on has had it's ap
Hey there,
I've been wondering if the assumption of four asset hosts for the sake of
speed improvements is still valid.
Rails documentation about asset hosts:
Browsers typically open at most two simultaneous connections to a single
> host, which means your assets often have to wait for other