css minification

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 16 13:26:02 PST 2015


On 1/16/15 1:13 PM, Steven Schveighoffer wrote:
> On 1/16/15 3:53 PM, Andrei Alexandrescu wrote:
>> On 1/16/15 12:37 PM, Steven Schveighoffer wrote:
>>> On 1/16/15 12:40 PM, Andrei Alexandrescu wrote:
>>>> I just added
>>>> https://github.com/D-Programming-Language/dlang.org/pull/770, which
>>>> generates minified css files. This is because in the near future css
>>>> files will become heftier (more documentation comments, more detailed
>>>> styles etc).
>>>>
>>>> The disadvantage is that now one needs to be online to generate
>>>> documentation. Thoughts?
>>>
>>> Almost all browsers support gzip transfer of files. You'd get much
>>> better mileage with just gzipping the file.
>>>
>>> -Steve
>>
>> That's part of the protocol, right? We should be doing that anyway.
>> Anyhow, the css is really hot and comments just add to it, compressed or
>> not. -- Andrei
>
> I think this is way over-optimization.
>
> If the system already sends gzipped, I don't think any kind of
> minification is going to improve enough to the point of justifying all
> this.
>
> (Dons Walter hat): have you profiled to see how much it saves?

Well good point. As of January two of the css files are in the top 3 
most trafficked files off of dlang.org, second only to favicon.ico. 
Loading css accounts for 12.78% of all dlang.org hits and 5.73% of all 
dlang.org bytes transferred. I'd say improvements would be measurable.

BTW are there ways to compress favicon.ico better? It's #1 with 10.28% 
of all hits and 16.27% of all bytes transferred.


Andrei



More information about the Digitalmars-d mailing list