reduce your white screen effect by 1.5 seconds

2 views
Skip to first unread message

David Beckwith

unread,
May 14, 2008, 9:47:18 PM5/14/08
to Philippine Ruby Users Group (PRUG/PhRUG)
By serving all of your javascript files and css files in one gzipped bundle from a Lighttpd server, you can drammatically reduce the white screen effect when the page first loads.  And you can cut your page load times by about 1-2 seconds -- not bad.  This would be a nice optimization to pursue for (y)our production applications.  This would probably help our RoR app load times quite a bit, especialy when loading from the Philippines where latency can really affect load times when they are done serially (like 4 big prototype javascript libraries, or 2 or 3 css files load sequentially). 

http://www.sitepoint.com/blogs/2007/04/10/faster-page-loads-bundle-your-css-and-javascript/

BTW, I thought most browsers open 4 sockets at a time and download 4 things in parallel all the time.  Or is that just for images?  Does anybody know about that?  If so, why wouldn't the browser download all four css files at the same time rather than in serial?

David :)

Greg Moreno

unread,
May 15, 2008, 6:01:56 AM5/15/08
to ruby...@googlegroups.com
more tips on how to speed-up your website
http://developer.yahoo.com/performance/rules.html

On Thu, May 15, 2008 at 9:47 AM, David Beckwith <dbitso...@gmail.com> wrote:
> By serving all of your javascript files and css files in one gzipped bundle
> from a Lighttpd server, you can drammatically reduce the white screen effect

--
#--------------------
Libro para sa bawat batang Pilipino
http://www.BayanihanBooks.org
#--------------------

Mark John Buenconsejo

unread,
May 15, 2008, 10:04:29 AM5/15/08
to ruby...@googlegroups.com
I think the default Firefox setting makes up to 2 connections (max)
per host (note, not ip address).

Here's also a nice read about good practices in improving load times
for your website:
http://www.die.net/musings/page_load_time/

Thanks!

Mark

On Thu, May 15, 2008 at 9:47 AM, David Beckwith <dbitso...@gmail.com> wrote:

--
------------------------------------
Mark John S. Buenconsejo
http://www.simpleteq.com

David Beckwith

unread,
May 16, 2008, 2:14:26 AM5/16/08
to Philippine Ruby Users Group (PRUG/PhRUG)
thanks great article!

On May 15, 3:01 am, "Greg Moreno" <greg.mor...@gmail.com> wrote:
> more tips on how to speed-up your websitehttp://developer.yahoo.com/performance/rules.html

David Beckwith

unread,
May 16, 2008, 2:17:41 AM5/16/08
to Philippine Ruby Users Group (PRUG/PhRUG)
"2 connections per host".... does a different subdomain count as a
different host? If so, you could create a lot of cheesy subdomains to
load your user's pages faster.... like fs1.yourdomain.com,
fs2.yourdomain.com.....

David :)


On May 15, 7:04 am, "Mark John Buenconsejo" <markjo...@gmail.com>
wrote:
> I think the default Firefox setting makes up to 2 connections (max)
> per host (note, not ip address).
>
> Here's also a nice read about good practices in improving load times
> for your website:http://www.die.net/musings/page_load_time/
>
> Thanks!
>
> Mark
>
>
>
> On Thu, May 15, 2008 at 9:47 AM, David Beckwith <dbitsoluti...@gmail.com> wrote:
> > By serving all of your javascript files and css files in one gzipped bundle
> > from a Lighttpd server, you can drammatically reduce the white screen effect
> > when the page first loads. And you can cut your page load times by about
> > 1-2 seconds -- not bad. This would be a nice optimization to pursue for
> > (y)our production applications. This would probably help our RoR app load
> > times quite a bit, especialy when loading from the Philippines where latency
> > can really affect load times when they are done serially (like 4 big
> > prototype javascript libraries, or 2 or 3 css files load sequentially).
>
> >http://www.sitepoint.com/blogs/2007/04/10/faster-page-loads-bundle-yo...

Mark John Buenconsejo

unread,
May 16, 2008, 5:29:00 AM5/16/08
to ruby...@googlegroups.com
Yep, in our case, we have assets1.caresharing.eu,
assets2.caresharing.eu, assets3.caresharing.eu and
assets4.caresharing.eu for hosting the asset files, pointing to the
same nginx server and to the same asset files.

While loading the page and looking at Firebug, it shows that the asset
files are being loaded in parallel.

Thanks!

Mark

boz

unread,
May 16, 2008, 5:05:27 AM5/16/08
to Philippine Ruby Users Group (PRUG/PhRUG)
If you remember, Rails had some mechanism to automatically generate
your image source URLs from different subdomains. This makes your
pages seem to load faster as your browser download stuff in parallel.

David Beckwith

unread,
May 29, 2008, 2:10:45 AM5/29/08
to ruby...@googlegroups.com
that's a sweet trick.  thanks!
--
SMS/Text: +63 905 220 2207
Skype: dbit_solutions

David Beckwith

unread,
May 29, 2008, 2:11:36 AM5/29/08
to ruby...@googlegroups.com
what's the name of the function or setting in rails?

Kenneth Demanawa

unread,
May 29, 2008, 2:14:47 AM5/29/08
to ruby...@googlegroups.com
via multiple_asset_hosts http://spattendesign.com/2007/10/24/setting-up-multiple-asset-hosts-in-rails

which is available in rails 2.X

hard wyrd

unread,
May 29, 2008, 2:48:51 AM5/29/08
to ruby...@googlegroups.com
I think you are referring to "persistent connections" and not "concurrent connections" in Firefox.

If you want to speed up FF, then do the following:

1. open "about:config" in FF address bar and tweak for the following values:

network.http.max-connections = 24
(default is 24)
network.http.max-connections-per-server = 10
(default is 8)
network.http.max-persistent-connections-per-proxy = 8
(default is 4)
network.http.max-persistent-connections-per-server = 4
(default is 2)
network.http.pipelining = true
(default is false)
network.http.pipelining.maxrequests = 10
( default is 4)
network.http.proxy.pipelining  = true
(default is false)


2. Optional tweaks:

content.notify.backoffcount  = 5
ui.submenuDelay = 0




On Thu, May 15, 2008 at 10:04 PM, Mark John Buenconsejo <mark...@gmail.com> wrote:

I think the default Firefox setting makes up to 2 connections (max)
per host (note, not ip address).

Here's also a nice read about good practices in improving load times
for your website:
http://www.die.net/musings/page_load_time/

Thanks!

Mark




--
Part-time SysAd, full-time Dad, part-time netNinja
CNS, ACFE, FOSS Advocate and Consultant
Registered Linux User #400165
http://baudizm.blogsome.com
http://linuxblazon.wordpress.com
Reply all
Reply to author
Forward
0 new messages