Project

General

Profile

Actions

Bug #40409

closed

typo3temp/compressor is flooded with identical files

Added by Jigal van Hemert over 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2012-08-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If absRefPrefix is set the result of inlineStyle2TempFile is returned with absRefPrefix prepended. If this is a fully qualified URL t3lib_Compressor::createMergedFile() will download the contents to a temporary file on each page. Even though the contents and the filename of this temporary file stay the same the modified timestamp is altered and thus a new merged file is created in typo3temp/compressor/.

In one installation we found 26 GB of identical CSS files.

Possible solutions:
  • detect if 'external' file is in fact local file and handle it as local
  • exclude 'external' files from merge/compress
  • option to exclude inlineStyle2TempFile result from merging/compressing (would mean new feature)

Files

40409-46.patch (26.7 KB) 40409-46.patch Ivan Dharma Kartolo, 2012-09-01 19:30
40409-46.patch (886 Bytes) 40409-46.patch Ivan Dharma Kartolo, 2012-09-01 19:40

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #52597: Compressor: Fetch external files correctlyRejected2013-10-07

Actions
Actions #1

Updated by Ivan Dharma Kartolo over 11 years ago

can't reproduce this :(

Update: my bad :( it's reproduceable

Following are set in TS:
  1. config.compressCSS
  2. config.concatenateCss
  3. config.minifyCSS
  4. config.absRefPrefix
Actions #2

Updated by Ivan Dharma Kartolo over 11 years ago

the problem is, that the temporary file (external-xxxx) is always rewritten, even tough the file is not changed. therefore the md5 in createMergedFile function is always changed, since the timestamp of the temporary file is always new.

patch is made against 4.6.12.

the idea is to check if the temporary file exists and the content is the same with the content fetched.
if the file doesn't exist or the content not the same (with the saved one), then write the new file.

can you test is?

Actions #3

Updated by Ivan Dharma Kartolo over 11 years ago

new patch file

Actions #4

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14268

Actions #5

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14269

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14269

Actions #7

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14269

Actions #8

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14269

Actions #9

Updated by Gerrit Code Review over 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14269

Actions #10

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/15442

Actions #11

Updated by Ivan Dharma Kartolo over 11 years ago

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

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/15492

Actions #13

Updated by Xavier Perseguers over 11 years ago

Seems that it should not go to 4.5

Actions #14

Updated by Xavier Perseguers over 11 years ago

  • Status changed from Under Review to Resolved
Actions #15

Updated by Gerrit Code Review about 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/17643

Actions #16

Updated by Benni Mack about 11 years ago

  • Status changed from Under Review to Resolved

won't fix in 4.5. so this is resolved.

Actions #17

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF