Project

General

Profile

Actions

Bug #73032

closed

File search causes memory leaks with too many files

Added by Alexander Schnitzler over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2016-01-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

During the file search in the file module the search result is only limited to possibly matching folders. That itself decreases the search over all files in a storage but it still does not prevent memory leaks, where the result of possible folders contain a decent amount of files.

Example:
fileadmin has a total of 10.000 files.
fileadmin has a subfolder called foo
fileadmin/foo holds a subset of 1000 files.
fileadmin/foo holds the file bar

A search for bar asks the database for all folders that contain files with the matching identifier bar. As a result, only the folder fileadmin/foo is returned which already excludes 9000 possible files.

Still, the resultset contains 1000 files, whoose name is compared php-wise with the search string. During that foreach loop each a file object with a decent memory footprint will be created. This easily exceeds the avialable memory limit.

Actions

Also available in: Atom PDF