As part of a migration, we import 30.000 images over plone.restapi. The site has about 28 different scales (the sense of this number is a different discussion) but this wastes a lot of time and space during the migration.
is there a way to defer the creation of image scale until they are used?
is it safe to clear the underlaying annotation (ScaleDict)? Will Plone re-create one scale or all scale if requested/needed?
AFAIK. No. Last week I made a plone.namedfile branch that defers them for fast REST API response, but it comes with a async worker to fill the space immediately.
I added the branch to our migration buildout and it clearly provides a significant improvement for us. Creating an image over plone.restapi (with 30 scales in our cases) take about 2-2,5 seconds in average (for "normal" images)..this went down to about 500ms which is great improvement when you have to migration about 30.000 images^^
Minor improvement: the logging message from the ScalingQueueProcessorThread should use the DEBUG log level...too much noise on the console otherwise.