- Issue created by @esolano
- Status changed to Needs work
almost 2 years ago 12:27pm 25 January 2023
When bulk-generating file entities, like on a Drupal migration, many calls are made to get the file's metadata. However, some of this metadata might have already been provided by the generating process (in this case, a migrate script).
The `File->preSave()` method does not check if the filesize property has already been set/provided. This could be improved by first checking for the filesize before attempting to retrieve it; thus avoiding extra requests to the original resource, which might be a remote file, and save time.
Only set the filesize if it is not yet known.
Needs work
10.1 ✨