Issue Feature Closed

#27694Speedup backend and allow compression in frontend

Kai Vogel 06/25/11, 10:50 updated 06/01/13, 14:45

Description

Changes:
  • Modify the t3lib_Compressor to provide a default compressor for the frontend
  • Add missing method to concatenate javascript files (config.concatenateJsAndCss does its job only for css files atm.)
  • Speedup the determination of relative paths
  • Concatenate jsFiles and jsFooterFiles in backend by default
*Backend speedup with merged js files:*
See in attached image what happens with the backend after login if the patch is active. The timeline was recorded with en empty typo3temp and cache. Parts of the image:
  1. All files before patch
  2. JS files before patch
  3. All files with active patch
  4. JS files with active patch

Basic configuration to use the compressor in frontend:

config {
  ## Enable Javascript and Stylesheet compression
  minifyJS  = 1
  minifyCSS = 1

  ## Merge Javascript and Stylesheet files into single files
  concatenateJsAndCss = 1
}

page {
  includeCSS.myext = fileadmin/stylesheet.css
  includeCSS.myext.compress = 1

  includeJS.myext = fileadmin/javascript.js
  includeJS.myext.compress = 1
}

Changed TYPO3_CONF_VARS to use concatenate handlers:

$GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['concatenateHandler']

is now:

$GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssConcatenateHandler']
$GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['jsConcatenateHandler']

Reviews 7