Bug #40409

typo3temp/compressor is flooded with identical files

Added by Jigal van Hemert over 8 years ago. Updated over 2 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

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

Actions
#1

Updated by Ivan Dharma Kartolo over 8 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
#2

Updated by Ivan Dharma Kartolo over 8 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?

#3

Updated by Ivan Dharma Kartolo over 8 years ago

new patch file

#4

Updated by Gerrit Code Review over 8 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

#5

Updated by Gerrit Code Review over 8 years ago

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

#6

Updated by Gerrit Code Review over 8 years ago

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

#7

Updated by Gerrit Code Review over 8 years ago

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

#8

Updated by Gerrit Code Review over 8 years ago

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

#9

Updated by Gerrit Code Review over 8 years ago

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

#10

Updated by Gerrit Code Review over 8 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

#11

Updated by Ivan Dharma Kartolo over 8 years ago

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

Updated by Gerrit Code Review over 8 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

#13

Updated by Xavier Perseguers over 8 years ago

Seems that it should not go to 4.5

#14

Updated by Xavier Perseguers over 8 years ago

  • Status changed from Under Review to Resolved
#15

Updated by Gerrit Code Review about 8 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

#16

Updated by Benni Mack almost 8 years ago

  • Status changed from Under Review to Resolved

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

#17

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF