May 31, 2013
On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
> Hello,
>
>
> I've been looking through the logs and it looks like the top files in bytes transferred yesterday (even with the deluge of downloads) were a number of Javascript, HTML, and CSS files.
>
> There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.
>
>
> Thanks for your insights,
>
> Andrei

It would be also great if you could remove that flashing after the page is loaded.
I believe it's caused by the bodyLoad() function. Why is it even needed?
May 31, 2013
On 5/31/13 1:28 PM, Brad Anderson wrote:
> On Friday, 31 May 2013 at 17:20:14 UTC, bearophile wrote:
>> Andrei Alexandrescu:
>>
>>> There are programs to reduce the size of such files called
>>> "minifiers". Should we use some? If so, what would the experts
>>> recommend? We'd need ideally some command line utility that we can
>>> deploy easily and integrate with the build process. Alternatively, an
>>> online service could fit the bill, too.
>>
>> Are those pages served gzipped?
>>
>> There is also this to test:
>> https://developers.google.com/speed/pagespeed/service/tryit
>>
>> Bye,
>> bearophile
>
> Ran it on http://dlang.org/
>
> http://www.webpagetest.org/result/130531_FM_d41bcc90232a08ecab128ed395047e63/

Got similar results. Quite dramatic. So what should I tell our admin?

Andrei
May 31, 2013
On 5/31/13 1:33 PM, Mr. Anonymous wrote:
> It would be also great if you could remove that flashing after the page
> is loaded.
> I believe it's caused by the bodyLoad() function. Why is it even needed?

Hyphenation.

Andrei
May 31, 2013
On Friday, 31 May 2013 at 17:33:15 UTC, Andrei Alexandrescu wrote:
> On 5/31/13 1:28 PM, Brad Anderson wrote:
>>
>> Ran it on http://dlang.org/
>>
>> http://www.webpagetest.org/result/130531_FM_d41bcc90232a08ecab128ed395047e63/
>
> Got similar results. Quite dramatic. So what should I tell our admin?
>
> Andrei

He would need to install mod_pagespeed: https://developers.google.com/speed/pagespeed/module/download

Do some typical Apache configuration (enabling the module for the Virtual Host and whatnot): https://developers.google.com/speed/pagespeed/module/configuration

Just using the default CoreFilters is probably fine.
May 31, 2013
On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
> Hello,
>
>
> I've been looking through the logs and it looks like the top files in bytes transferred yesterday (even with the deluge of downloads) were a number of Javascript, HTML, and CSS files.
>
> There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.
>
I may be in the minority in this, but I would prefer if some of that were just removed entirely.

In particular, the code-running doohickey that doesn't even work needs to die for the pathological behaviour it gives on Firefox.  For example http://dlang.org/phobos/std_algorithm.html hung my browser for almost twenty seconds with a blank coloured background.  This is on an i5 at work and my i7 at home, with or without extensions.  I can't even imagine how my old laptop would cope.  To add insult to injury, it displayed the page without the JS for almost a second before disappearing.

I'm fine with some light JS that makes the documentation more usable or useful; this makes it practically unusable unless I have access to NoScript.
May 31, 2013
On Friday, 31 May 2013 at 17:43:09 UTC, Wyatt wrote:
> I may be in the minority in this, but I would prefer if some of that were just removed entirely.
>
> In particular, the code-running doohickey that doesn't even work needs to die for the pathological behaviour it gives on Firefox.  For example http://dlang.org/phobos/std_algorithm.html hung my browser for almost twenty seconds with a blank coloured background.  This is on an i5 at work and my i7 at home, with or without extensions.  I can't even imagine how my old laptop would cope.
>  To add insult to injury, it displayed the page without the JS for almost a second before disappearing.
>
> I'm fine with some light JS that makes the documentation more usable or useful; this makes it practically unusable unless I have access to NoScript.

I actually second this. I block those scripts because they slow the pages down massively, and often break. I'm using Firefox on Windows with a beefy i7.
May 31, 2013
On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:
> ... I'm a bit weary of ...

I keep seeing people use this phrase; shouldn't it be "wary"?

Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)
May 31, 2013
On Friday, 31 May 2013 at 17:23:49 UTC, Andrei Alexandrescu wrote:
> I don't know if the server is configured to serve them gzipped. How do I figure that out?

I'd just upload a file.html.gz (gzip file.html on your own computer) and then try to go to dlang.org/file.html

It might just work. If that doesn't, rename file.html.gz to file.html and again try it, if it just works, add gzip to your build process then upload.

If it doesn't just work, and .htaccess is enabled, try adding this to your .htaccess file and then try again:


<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{HTTP:Accept-encoding} gzip
   RewriteCond %{HTTP_USER_AGENT} !Safari
   RewriteCond %{REQUEST_FILENAME}.gz -f
   RewriteRule ^(*.html)$ $1.gz [QSA,L]
<FilesMatch \.html\.gz$>
   ForceType text/html
   Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
<IfModule mod_mime.c>
   AddEncoding gzip .gz
</IfModule>


that just does html, the regexs will need matching for js and css too, but that should work. I use this on one of my computers to serve up file.html.gz as file.html transparently.

BTW I suck at apache config and hate doing it (this is why my cgi.d has a gzip flag among others - easier to do in D than httpd.conf!) so if someone has a better way please overrule me.

> Can we count on all modern browsers to ask for gzipped content?

Yeah, and if not the server will most likely unzip it for you as needed.
May 31, 2013
On 2013-05-31, 19:47, David Gileadi wrote:

> On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:
>> ... I'm a bit weary of ...
>
> I keep seeing people use this phrase; shouldn't it be "wary"?
>
> Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)

Certainly he would be weary, too? :p

-- 
Simen
May 31, 2013
On Fri, May 31, 2013 at 07:43:08PM +0200, Wyatt wrote:
> On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
[...]
> >I've been looking through the logs and it looks like the top files in bytes transferred yesterday (even with the deluge of downloads) were a number of Javascript, HTML, and CSS files.
> >
> >There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.
> >
> I may be in the minority in this, but I would prefer if some of that were just removed entirely.

+1.

I browse dlang.org with JS turned off because it's much more usable that way. I've no idea what the JS does (the only visible effect I can see is the ugly blob of unreadable links in the Phobos docs which are useless anyway -- the links, I mean, not the docs), but it makes page contents vanish for a good number of seconds, causes my browser to soak up memory like a sponge, and results in poor performance in general.

We should either fix whatever is causing the performance hit, or just get rid of it altogether.


[...]
> I'm fine with some light JS that makes the documentation more usable or useful; this makes it practically unusable unless I have access to NoScript.

Due to several sites that recently insisted on adding heavy-duty JS that doesn't add any significant functionality, I've turned off JS by default and only enable it on a site-by-site need-to basis (I use Opera that has per-site preferences built-in). The web is surprisingly faster and easier to use that way.

(Most people will probably think I'm nuts, though. And they're probably
right. :-P *shrug*)


T

-- 
In order to understand recursion you must first understand recursion.