checkSize enumerates all the files in a large temp folder 100001 times every hour

Description

Does this really need to enumerate the folder every time within the while loop,
and then loop over the enumerated list of files again comparing dates?

https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/engine/Controler.java#L507

see

also to avoid hammering the disk with deletes, it might be work adding a short sleep every 5000 files

Once this is made more efficient, maybe we increase the number of files to delete, because 100,000 files on a busy server may never even get under the max size threshold and run out of disk space

Environment

None

Activity

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 8 September 2020 at 12:09
Updated 12 November 2024 at 10:41