[TYPO3-dev] Javascript Minify-Manager

Dmitry Dulepov dmitry at typo3.org
Thu Mar 5 13:37:32 CET 2009


Hi!

Sebastian Gebhard wrote:
> Dmitry Dulepov schrieb:
>> Firsts, minification feature is already implemented in TYPO3 4.2.
>> Secondly, there is an extension that can minify/combine JS and CSS
>> files together.
> Where is it implemented? What's the extensions name?

Hey, this is an easy search! ;)

http://www.google.com/search?q=typo3%20minify%20javascript
http://typo3.org/extensions/repository/?tx_terfe_pi1[view]=search&no_cache=1&tx_terfe_pi1[sword]=script+merge

>> The drawback of such things is that they happen at runtime, thus
>> making the performance of the server worse. Minification of the
>> JavaScript using PHP is extremely inefficient. When possible it should
>> be done separately before deploying the site.
> Did you read my post fully? Maybe I did not make it clear enough but in
> most cases with my approach the JS of a single page is only minified
> ONCE and that file is used permanently until something is changed.

Yes, I understood it. But even "once" is too much for me if the script can be minified offline. For example PHP minification of one ExtJS application that I wrote takes minutes. It takes 3 secs with a command line version.

It is not a problem to minify small scripts. But with small scripts the effect is not that significant. With large scripts minification at runtime becomes a major problem. Think what happens on a busy site when a large script is changed. 100 people come, 100 requests check and find that the file is modified, 100 requests start to minify it, server is blocked.

-- 
Dmitry Dulepov
TYPO3 core team
http://dmitry-dulepov.com/
"Computers are so unreliable... just like people" (Major Cain, "Resident Evil: Apocalypse")




More information about the TYPO3-dev mailing list