#27694Speedup backend and allow compression in frontend
Description
Changes:
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:
- 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
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:
- All files before patch
- JS files before patch
- All files with active patch
- 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
- TYPO3_4-7 21411[BUGFIX] compressJs returns wrong filenames
- TYPO3_6-0 21410[BUGFIX] compressJs returns wrong filenames
- TYPO3_6-1 21409[BUGFIX] compressJs returns wrong filenames
- main 20845[BUGFIX] compressJs returns wrong filenames
- TYPO3_4-5 9815[BUGFIX] Instance properties are defined statically
- main 2924[FEATURE] Speedup backend and allow compression in frontend
- TYPO3_4-5 9814[TASK] Clean-up PHPdoc comments in t3lib_PageRenderer