January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On 1/16/15 2:17 PM, Steven Schveighoffer wrote:
> On 1/16/15 5:12 PM, Andrei Alexandrescu wrote:
>> On 1/16/15 1:44 PM, Steven Schveighoffer wrote:
>>> I don't care how much of the overall bandwidth it is, what I was asking
>>> is how much does the file shrink if you minify.
>>
>> 30% -- ANDREI
>
> so d-minified.css.gz is 30% smaller than d.css.gz? Just want to clarify.
No, I didn't do any compression. Please do it and beat me over the head with your pull request. -- Andrei
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 1/16/15 2:26 PM, Vladimir Panteleev wrote:
> On Friday, 16 January 2015 at 22:17:51 UTC, Steven Schveighoffer wrote:
>> On 1/16/15 5:12 PM, Andrei Alexandrescu wrote:
>>> On 1/16/15 1:44 PM, Steven Schveighoffer wrote:
>>>> I don't care how much of the overall bandwidth it is, what I was asking
>>>> is how much does the file shrink if you minify.
>>>
>>> 30% -- ANDREI
>>
>> so d-minified.css.gz is 30% smaller than d.css.gz? Just want to clarify.
>>
>> -Steve
>
> Original Minified
> Uncompressed 16028 11959
> gzip -9 4252 3194
>
> Looks closer to 25%, but same ballpark.
So then the two optimizations don't compete. I hate it when I'm right :o). -- Andrei
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 1/16/15 5:23 PM, Andrei Alexandrescu wrote: > On 1/16/15 1:44 PM, Steven Schveighoffer wrote: >> On an embedded product we have with a dead-simple web server, there is >> terrible network performance. Adding gzip support saved way more than >> minification ever could. But the best performance improvement was to add >> caching support to the server. Both the browser and the server have to >> cooperate there. > > Pretty cool. The problem I'm having right now is the following pattern: > > 1. I have a mini-idea that takes me minutes to implement and turns the > ratchet in the right direction. At the cost of adding dependencies for builds, and requiring builds be done with Internet access. I don't think it's out of line to ask that if we are going to add extra build requirements, we should make sure it's really making decent progress. > 2. I post it here in the hope that others will build upon or come with > better ideas. > > 3. I get feedback here that essentially demonstrates me that if I spent > some hours or days on a small research project on a better idea, it > would yield better results. I think you misunderstand. We are not saying "do a research project", it takes seconds to gzip 2 files (the minified and not minified) and see the size difference. If it's super-significant, let's go for it! If you send me the minified file, I can test it for you. There doesn't need to be any research, but all the suggestions that have been provided have NOT required extra tools or dependencies. That is a significant difference. -Steve |
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 1/16/15 5:30 PM, Andrei Alexandrescu wrote:
> On 1/16/15 2:26 PM, Vladimir Panteleev wrote:
>> On Friday, 16 January 2015 at 22:17:51 UTC, Steven Schveighoffer wrote:
>>> On 1/16/15 5:12 PM, Andrei Alexandrescu wrote:
>>>> On 1/16/15 1:44 PM, Steven Schveighoffer wrote:
>>>>> I don't care how much of the overall bandwidth it is, what I was
>>>>> asking
>>>>> is how much does the file shrink if you minify.
>>>>
>>>> 30% -- ANDREI
>>>
>>> so d-minified.css.gz is 30% smaller than d.css.gz? Just want to clarify.
>>>
>>> -Steve
>>
>> Original Minified
>> Uncompressed 16028 11959
>> gzip -9 4252 3194
>>
>> Looks closer to 25%, but same ballpark.
>
> So then the two optimizations don't compete. I hate it when I'm right
> :o). -- Andrei
If the CSS isn't frequently changing, a 4kb file should not comprise 5% of all traffic if caching is enabled.
I certainly think this is well worth the optimization, though, 25% is a good improvement.
-Steve
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On 1/16/15 2:32 PM, Steven Schveighoffer wrote:
>
> I think you misunderstand. We are not saying "do a research project", it
> takes seconds to gzip 2 files (the minified and not minified) and see
> the size difference. If it's super-significant, let's go for it! If you
> send me the minified file, I can test it for you.
>
> There doesn't need to be any research, but all the suggestions that have
> been provided have NOT required extra tools or dependencies. That is a
> significant difference.
The more involved part is figuring out what support is out there for compressed transfers, configuring the site, etc. --- Andrei
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On 1/16/15 2:35 PM, Steven Schveighoffer wrote:
> If the CSS isn't frequently changing, a 4kb file should not comprise 5%
> of all traffic if caching is enabled.
May be a sign we have lots of new visitors :o). -- Andrei
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 1/16/15 5:58 PM, Andrei Alexandrescu wrote:
> On 1/16/15 2:32 PM, Steven Schveighoffer wrote:
>>
>> I think you misunderstand. We are not saying "do a research project", it
>> takes seconds to gzip 2 files (the minified and not minified) and see
>> the size difference. If it's super-significant, let's go for it! If you
>> send me the minified file, I can test it for you.
>>
>> There doesn't need to be any research, but all the suggestions that have
>> been provided have NOT required extra tools or dependencies. That is a
>> significant difference.
>
> The more involved part is figuring out what support is out there for
> compressed transfers, configuring the site, etc. --- Andrei
>
Right, I understand. I'm not in a position to actually make those changes or support those servers, so I'll shut up.
I was just saying my experience with what works and what doesn't with optimizing web traffic.
-Steve
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 17/01/2015 6:40 a.m., 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?
>
>
> Andrei
For reference, Cmsed has a port of a css/javascript minifier.
Feel free to extract it (its a subpackage so pretty easy).
In fact I believe its one file.
|
January 16, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rikki Cattermole | On 1/16/15 6:39 PM, Rikki Cattermole wrote: > On 17/01/2015 6:40 a.m., 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? >> >> >> Andrei > > For reference, Cmsed has a port of a css/javascript minifier. > Feel free to extract it (its a subpackage so pretty easy). > In fact I believe its one file. Just googled it. For further reading: https://github.com/rikkimax/Cmsed -Steve |
January 17, 2015 Re: css minification | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 2015-01-16 22:32, Vladimir Panteleev wrote: > That's probably because HTTP caching is not configured. > > Ideally, you'd put the file's modification time in its path, e.g.: > > <link rel="stylesheet" type="text/css" href="css/1421443851/style.css" /> Or a hash of the file content in the filename. -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation