Project

General

Profile

Actions

Feature #21565

closed

Generating multiple directories for images in GB/ and pics/

Added by Ries van Twisk about 15 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Start date:
2009-11-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

When TYPO3 needs to generate many thousands of images (>50.000) then most file systems will slow down because TYPO3 will put all generated images into one directory.

- All files are store stored under the GB and pics directory, and sub-directories are created based on there
filename's data.

- There are 4 additional settings added to config_default.php to set the levels and filename's length for gifbuilder and imagemagick.

- The functions fileName and createTempSubDir are backwards compatible and behave the same.

However the function fileName now as an option to not add a tempDir to a generated filename. This was done to prevent funky str_replaces for path creations in the gifBuild function

The function createTempSubDir now uses mkdir_deep from t3lib_div to create 'deep' (recursive) sub directories

I believe that the patch might not be CGL compatible, I hope to hear your comments on that. If you have any other suggestions/comments/questions. Please let me know.

Ries

Example:

When the number of levels to create is set to 3, and the size of the filename is set to 16.

Then if the generate image name is: fa361bcd532ea5f4.jpg

The following directory will get create: typo3temp/f/a/3/fa361bcd532ea5f4.jpg

(issue imported from #M12609)


Files

12609.patch (9.25 KB) 12609.patch Administrator Admin, 2009-11-16 13:19
12609_v2.patch (8.4 KB) 12609_v2.patch Administrator Admin, 2009-11-27 22:58
Actions

Also available in: Atom PDF