From 6ad780e217ab50b5130b1873d7cf5b6c774a7374 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Wed, 23 Jan 2019 19:29:03 +1300 Subject: [PATCH 1/2] DOCS Add more info about migrations huge number files --- .../14_Files/05_File_Migration.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md b/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md index 4c4a23c33e1..b52340ea31c 100644 --- a/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md +++ b/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md @@ -77,3 +77,24 @@ SilverStripe\Assets\Flysystem\FlysystemAssetStore: ``` Note that this will not allow you to utilise certain file versioning features in 4.0. + +## Migrating substantial number of files + +The time it takes to run the file migration will depend on the number of files and their size. The generation of thumbnail will depend on the number and dimension of your images. + +If you are migrating a substantial number of files, you should run file migration task either as a queued job or on the command line. If the migration task fails or times out, you can start it again and will pick off where it left off. + +If your environement supports the _Imagick_ PHP library, you may want to use that library instead of _GD_. Imagick is considerably faster when resizing images. You can switch back to _GD_ after running the file migration task. + +[Changing the image manipulation driver to Imagick](/02_Developer_Guides/14_Files/02_Images#changing-the-manipulation-driver-to-imagick) + +If your project host big images (e.g. 4K images), this can also affect the amount of memory use to generate the thumbnails. The file migration task assumes that it will have at least 512MB of memory available. + +By default the file migration task will not generate thumbnails for files greater than 9MB to avoid exausthing the available memory. To increase this limit, add the following code to your YML configuration. + +```yml +SilverStripe\Core\Injector\Injector: + SilverStripe\AssetAdmin\Helper\ImageThumbnailHelper: + constructor: + 0: '100MB' +``` \ No newline at end of file From 6f180574a564a99ab7f59c6ec2ffdea192c8622b Mon Sep 17 00:00:00 2001 From: Andre Kiste Date: Tue, 29 Jan 2019 18:58:58 +1300 Subject: [PATCH 2/2] Update 05_File_Migration.md Fixed typos. --- .../14_Files/05_File_Migration.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md b/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md index b52340ea31c..0fd19dc0472 100644 --- a/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md +++ b/docs/en/02_Developer_Guides/14_Files/05_File_Migration.md @@ -80,21 +80,23 @@ Note that this will not allow you to utilise certain file versioning features in ## Migrating substantial number of files -The time it takes to run the file migration will depend on the number of files and their size. The generation of thumbnail will depend on the number and dimension of your images. +The time it takes to run the file migration will depend on the number of files and their size. The generation of thumbnails will depend on the number and dimension of your images. -If you are migrating a substantial number of files, you should run file migration task either as a queued job or on the command line. If the migration task fails or times out, you can start it again and will pick off where it left off. +If you are migrating a substantial number of files, you should run file migration task either as a queued job or on the command line. If the migration task fails or times out, you can start it again and it will pick up where it left off. If your environement supports the _Imagick_ PHP library, you may want to use that library instead of _GD_. Imagick is considerably faster when resizing images. You can switch back to _GD_ after running the file migration task. -[Changing the image manipulation driver to Imagick](/02_Developer_Guides/14_Files/02_Images#changing-the-manipulation-driver-to-imagick) +[Changing the image manipulation driver to Imagick](images#changing-the-manipulation-driver-to-imagick) -If your project host big images (e.g. 4K images), this can also affect the amount of memory use to generate the thumbnails. The file migration task assumes that it will have at least 512MB of memory available. +If your project hosts big images (e.g. 4K images), this can also affect the amount of memory used to generate the thumbnails. The file migration task assumes that it will have at least 512MB of memory available. -By default the file migration task will not generate thumbnails for files greater than 9MB to avoid exausthing the available memory. To increase this limit, add the following code to your YML configuration. +By default the file migration task will not generate thumbnails for files greater than 9MB to avoid exhausting the available memory. To increase this limit, add the following code to your YML configuration: ```yml SilverStripe\Core\Injector\Injector: SilverStripe\AssetAdmin\Helper\ImageThumbnailHelper: constructor: 0: '100MB' -``` \ No newline at end of file +``` + +You can also set this to `0` to disable the limit.