Bug #56746

File list always fetches all files in folder

Added by Christian Weiske over 5 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-03-11
Due date:
% Done:

50%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using the filelist module to list files in a folder of a FAL storage, FileList.php always requests all files at once, even though only 40 are displayed at the same time.

This is problematic if there is a huge number of files in that folder that need to be fetched remotely via an API.

It would be better if at first a call would be made to fetch the number of files in that folder (to make pagination calculation work), and then only request needed files by setting $start and $numberOfItems arguments in getFilesInFolder() correctly.

Happens with TYPO3 6.2beta6.


Related issues

Related to TYPO3 Core - Feature #64764: FileList and ElementBrowser must implement a paginate system for files Accepted 2015-02-02
Related to TYPO3 Core - Task #66327: Rename FAL driver count methods Closed 2015-04-08
Related to TYPO3 Core - Bug #75370: OutOfBoundsException in LocalDriver.php Closed 2016-04-01
Related to TYPO3 Core - Bug #73754: LocalDriver sorting bug if multiple file with same timestamp Closed 2016-02-29
Duplicated by TYPO3 Core - Bug #57811: filelist and file wizard very slow for more file than usual Closed 2014-04-10
Precedes TYPO3 Core - Feature #66464: File selection popup does not use FAL driver count*() methods New 2015-04-17

Associated revisions

Revision d32e20d1 (diff)
Added by Christian Weiske over 4 years ago

[!!!][FEATURE] Add count methods and sort functionality to FAL drivers

Instead of fetching all files and folders to count them,
two new FAL driver methods are introduced:
getFoldersInFolderCount() and getFilesInFolderCount()

Filelist makes use of the new counting methods, reducing the
processing time folders which contain a large number of files.

Sorting files is also moved into the driver.

Change-Id: I79c18fb697c976649adb40637f22df5341396d1e
Resolves: #56746
Releases: master
Reviewed-on: http://review.typo3.org/28560
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>

Revision 7ee56087 (diff)
Added by Mathias Brodala over 4 years ago

[FOLLOW-UP][TASK] Rename FAL driver count methods

This changes the names of the newly added FAL driver count methods
to be more intuitive.

Since the new API wasn't published yet, this is not a breaking change.

Resolves: #66327
Related: #56746
Releases: master
Change-Id: Ia5732266bada674b64a9d9768dfff98871eb6b13
Reviewed-on: http://review.typo3.org/38533
Reviewed-by: Steffen Müller <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Frans Saris <>
Tested-by: Steffen Müller <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28560

#2 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28560

#3 Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/28560

#4 Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/28560

#5 Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/28560

#6 Updated by Gerrit Code Review over 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/28560

#7 Updated by Gerrit Code Review over 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/28560

#8 Updated by Christian Weiske over 4 years ago

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

#9 Updated by José Ricardo over 2 years ago

Is this solution also applied for TYPO3 7.6? I'm getting the same issue there. (TYPO3 7.6.11)

#10 Updated by André Richter over 1 year ago

  • Priority changed from Should have to Must have

The solution isn't applied for the search-function (v8.7).
When searching for a file in dam the new parameters ($sort,...) are not used when calling the function getFoldersInFolder.
searchByName (core/Classes/Resource/FileRepository.php)

#11 Updated by André Richter over 1 year ago

  • % Done changed from 100 to 50

#12 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF