Feature #27694

Speedup backend and allow compression in frontend

Added by Kai Vogel over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2011-06-25
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

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']

Backend.jpg View (405 KB) Kai Vogel, 2011-06-25 10:50


Related issues

Related to TYPO3 Core - Bug #48213: compressJs wrong filenames Closed 2013-05-15

Associated revisions

Revision de141dc3 (diff)
Added by Kai Vogel over 8 years ago

[FEATURE] Speedup backend and allow compression in frontend

This patch improves the determination of relative paths of include
files, concatenates the jsFiles and jsFooterFiles in backend by
default to speedup the backend and provides a default compressor
for the frontend.

Change-Id: I569d285cc12c7eec808094903d5c8ee2e749f9ec
Resolves: #27694

Revision 54b79064 (diff)
Added by Kai Vogel over 8 years ago

[FEATURE] Speedup backend and allow compression in frontend

This patch improves the determination of relative paths of include
files, concatenates the jsFiles and jsFooterFiles in backend by
default to speedup the backend and provides a default compressor
for the frontend.

Change-Id: I569d285cc12c7eec808094903d5c8ee2e749f9ec
Resolves: #27694

Revision d6d85b1b (diff)
Added by Kai Vogel over 8 years ago

[FEATURE] Speedup backend and allow compression in frontend

This patch improves the determination of relative paths of include
files, concatenates the jsFiles and jsFooterFiles in backend by
default to speedup the backend and provides a default compressor
for the frontend.

Change-Id: I569d285cc12c7eec808094903d5c8ee2e749f9ec
Resolves: #27694

Revision 0c030cea (diff)
Added by Kai Vogel over 8 years ago

[FEATURE] Speedup backend and allow compression in frontend

This patch improves the determination of relative paths of include
files, concatenates the jsFiles and jsFooterFiles in backend by
default to speedup the backend and provides a default compressor
for the frontend.

Change-Id: I569d285cc12c7eec808094903d5c8ee2e749f9ec
Resolves: #27694
Reviewed-on: http://review.typo3.org/2924
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
Reviewed-by: Georg Ringer

Revision afdbb209 (diff)
Added by Kai Vogel almost 8 years ago

[BUGFIX] Instance properties are defined statically

Instance properties are defined statically in t3lib_PageRenderer

Change-Id: I245d8a73e9abca8ac3bdef141605b91a09c845e0
Resolves: #35159
Related: #27694
Releases: 4.5
Reviewed-on: http://review.typo3.org/9815
Reviewed-by: Philipp Gampe
Reviewed-by: Oliver Klee
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision 7689dca1 (diff)
Added by Kai Vogel almost 8 years ago

[TASK] Clean-up PHPdoc comments in t3lib_PageRenderer

Back-port of clean-up that was introduced with #27694.

Change-Id: I089c9e47ace839722a532e807949f86dde6917ec
Resolves: #35158
Related: #27694
Releases: 4.5
Reviewed-on: http://review.typo3.org/9814
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision 1c8856fa (diff)
Added by Philipp Gampe over 6 years ago

[BUGFIX] compressJs returns wrong filenames

If you enable
config.concatenateJs = 1
config.compressJs = 1
then the uncompressed version of the file is linked.

This does not change much, because compression is disabled and the files
will always be uncompressed, however the right link should be generated.

The allows extension to override the compress method and implement
compression without fixing the rest of the code.

The bug is a regression introduced with: #27694 (4.6).

Return the correct filename by overriding the filename with the returned
value of compressJsFile.

Resolves: #48213
Related: #27694
Releases: 6.2, 6.1, 6.0, 4.7
Change-Id: I1f65576db8084b54f9e5a13947ced258eef893d7
Reviewed-on: https://review.typo3.org/20845
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

Revision 77d5c639 (diff)
Added by Philipp Gampe over 6 years ago

[BUGFIX] compressJs returns wrong filenames

If you enable
config.concatenateJs = 1
config.compressJs = 1
then the uncompressed version of the file is linked.

This does not change much, because compression is disabled and the files
will always be uncompressed, however the right link should be generated.

The allows extension to override the compress method and implement
compression without fixing the rest of the code.

The bug is a regression introduced with: #27694 (4.6).

Return the correct filename by overriding the filename with the returned
value of compressJsFile.

Resolves: #48213
Related: #27694
Releases: 6.2, 6.1, 6.0, 4.7
Change-Id: I1f65576db8084b54f9e5a13947ced258eef893d7
Reviewed-on: https://review.typo3.org/20845
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-on: https://review.typo3.org/21409

Revision 802f4c69 (diff)
Added by Philipp Gampe over 6 years ago

[BUGFIX] compressJs returns wrong filenames

If you enable
config.concatenateJs = 1
config.compressJs = 1
then the uncompressed version of the file is linked.

This does not change much, because compression is disabled and the files
will always be uncompressed, however the right link should be generated.

The allows extension to override the compress method and implement
compression without fixing the rest of the code.

The bug is a regression introduced with: #27694 (4.6).

Return the correct filename by overriding the filename with the returned
value of compressJsFile.

Resolves: #48213
Related: #27694
Releases: 6.2, 6.1, 6.0, 4.7
Change-Id: I1f65576db8084b54f9e5a13947ced258eef893d7
Reviewed-on: https://review.typo3.org/20845
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-on: https://review.typo3.org/21410

Revision bef07f33 (diff)
Added by Philipp Gampe over 6 years ago

[BUGFIX] compressJs returns wrong filenames

If you enable
config.concatenateJs = 1
config.compressJs = 1
then the uncompressed version of the file is linked.

This does not change much, because compression is disabled and the files
will always be uncompressed, however the right link should be generated.

The allows extension to override the compress method and implement
compression without fixing the rest of the code.

The bug is a regression introduced with: #27694 (4.6).

Return the correct filename by overriding the filename with the returned
value of compressJsFile.

Resolves: #48213
Related: #27694
Releases: 6.2, 6.1, 6.0, 4.7
Change-Id: I1f65576db8084b54f9e5a13947ced258eef893d7
Reviewed-on: https://review.typo3.org/21411
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

History

#1 Updated by Mr. Hudson over 8 years ago

Patch set 1 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#2 Updated by Mr. Hudson over 8 years ago

Patch set 2 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#3 Updated by Mr. Hudson over 8 years ago

Patch set 3 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#4 Updated by Mr. Hudson over 8 years ago

Patch set 4 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#5 Updated by Mr. Hudson over 8 years ago

Patch set 5 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#6 Updated by Mr. Hudson over 8 years ago

Patch set 6 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#7 Updated by Mr. Hudson over 8 years ago

Patch set 7 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#8 Updated by Mr. Hudson over 8 years ago

Patch set 8 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#9 Updated by Mr. Hudson over 8 years ago

Patch set 9 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#10 Updated by Mr. Hudson over 8 years ago

Patch set 10 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#11 Updated by Mr. Hudson over 8 years ago

Patch set 11 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#12 Updated by Kai Vogel over 8 years ago

I've splitted "concatenateJsAndCss" into two options to concatenate Javascript and CSS files separately:

config {
  ## Concatenate Javascript and Stylesheet files
  concatenateJS = 1
  concatenateCSS = 1

  ## Also available for backward compatibility reasons,
  ## will concatenate JS and CSS files
  concatenateJsAndCss = 1
}

There is also a new setting to exclude single files from concatenation:

page {
  includeCSS.myext = fileadmin/stylesheet.css
  includeCSS.myext {
    ## Exclude file from concatenation
    excludeFromConcatenation = 1
  }
}

#13 Updated by Mr. Hudson over 8 years ago

Patch set 12 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#14 Updated by Mr. Hudson over 8 years ago

Patch set 13 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#15 Updated by Dmitry Dulepov over 8 years ago

  • Status changed from New to Under Review

#16 Updated by Xavier Perseguers over 8 years ago

  • Priority changed from Should have to Must have

#17 Updated by Mr. Hudson over 8 years ago

Patch set 14 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#18 Updated by Mr. Hudson over 8 years ago

Patch set 15 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#19 Updated by Kai Vogel over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#20 Updated by Chris topher over 8 years ago

  • Status changed from Resolved to Under Review
  • % Done changed from 100 to 0

No, this one has obviously not yet been committed. Review is still in progress at http://review.typo3.org/2924

#21 Updated by Mr. Hudson over 8 years ago

Patch set 16 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#22 Updated by Mr. Hudson over 8 years ago

Patch set 17 of change I569d285cc12c7eec808094903d5c8ee2e749f9ec has been pushed to the review server.
It is available at http://review.typo3.org/2924

#23 Updated by Kai Vogel over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#24 Updated by Xavier Perseguers almost 8 years ago

  • Status changed from Resolved to Closed

#25 Updated by Ernesto Baschny over 6 years ago

  • Target version deleted (4.6.0-beta1)

Also available in: Atom PDF