[wp-hackers] Packing JavaScript

Callum Macdonald lists.automattic.com at callum-macdonald.com
Tue Sep 18 21:44:48 GMT 2007


Given that the javascript is only used in the admin, I agree, we should 
reduce the workload for the WP developers and stick to what we can get 
from the lib authors, leave it at that.

I think combining into single files can _significantly_ improve 
performance. I have one TinyMCE instance that creates 174 requests, it 
takes 90 seconds to load. _But_, there's no point doing this ourselves, 
it creates too my work for the benefit in my opinion.

My two pence! Cheers - Callum.

Omry Yadan wrote:
> This is not true because of browser cache.
>
> besides, you need to look at the bigger picture:
>
> how much you are effecting the entire size of data a user gets when
> connecting to the blog, not just how much you save from the javascript.
>
> for example, if your entire front page is 200k including images and
> everything, and you can save 10k of javascript out of 20k, you didn't
> save 50%, you saved 5%.
>
>
> in addition, the javascript is used mostly in the admin section,  the
> default theme does not include ANY javascript files.
>
> I think if there is an option, we should compacted javascript files
> provided by library authors.
>
> nothing more.
>
>
> Computer Guru wrote:
>
>   
>> Just my two cents:
>>
>> I think it is pretty illogical to not do something just because it "might
>> not be as effective" as other things that aren't mutually exclusive.
>>
>> Hell, if it's just a 1% difference w/ minification + gz compression +
>> bundling vs just gz compression... That's 1% TIMES xx MILLIONS of requests
>> to your blog === LOTS of bandwdith saved!
>>
>> And in this case, it's more than that, seemingly a lot more. But even if it
>> isn't, I don't think that's a good excuse.
>>
>> -CG
>>
>>
>> On 9/18/07, Charles <lists07 at wiltgen.net> wrote:
>>   
>>     
>>>>> Anyway, the combination of (1) JavaScript compression, (2) generic
>>>>> server-side text compression and (3) file-combining is the norm,
>>>>> not the exception, for sites that uses JavaScript for anything
>>>>> more serious than roll-overs.
>>>>>         
>>>>>           
>>>> 1 and 3 are useless in most (not all, mind you) cases.
>>>>       
>>>>         
>>> I'm not sure how you arrived at that conclusion.
>>>
>>> Check out this chart to understand how server-side text compression and
>>> JavaScript compression/minification* are complementary:
>>>
>>> <http://yuiblog.com/assets/pageweight/filesize_by_type.gif>
>>>
>>> Combining files when possible is almost always a good idea for deployed
>>> apps, since (1) HTTP requests are relatively expensive and (2) browsers
>>> typically limit themselves to two parallel downloads per hostname.
>>>
>>> -- Charles
>>>
>>> P.S.  I tend to call minifiers that use JavaScript interpreters to avoid
>>> introducing new bugs during the minification process "compressors".  Not
>>> everyone makes the distinction.
>>>
>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>>     
>>>       
>>
>>   
>>     
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>   



More information about the wp-hackers mailing list