Migrate to PHP bindings of libvips for faster image preview generation #50146
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
enhancement
feature: previews and thumbnails
How to use GitHub
Is your feature request related to a problem? Please describe.
I recently installed the Memories app along with the Preview Generation app. As per the Preview Generation app's instructions, I began running the
preview:generate-all
command, and I've noticed that preview generation can take up to 4 seconds for some of my larger photos. This becomes an issue when I'm trying to pre-generate previews for tens of thousands of images.Describe the solution you'd like
Upon setting the NextCloud development environment from the instructions here and stepping through some code, it looks like the internals of image manipulation for preview generation is done with GD. Would it be possible to migrate the usage of GD to libvips via php-vips or some other FFI/external tool? I did try to play with this idea in my development environment. However, since I am completely inexperienced in the PHP world, I was unsuccessful in getting the PHP installation to be happy with enabling FFI in my development environment. As such, I do not know the feasibility of such a migration or the performance/security implications.
Describe alternatives you've considered
I imagine there has been talk of using ImageMagick as the drop-in replacement for GD. Or, perhaps there exist applications (or support for applications) that can customize the default preview provider for various image types?
Additional context
If someone were able to point me in the right direction in getting FFI support enabled for PHP in a docker container, I would be happy to set up the development environment once again and give it another go. Otherwise, if anyone has any insight into this, such insight would be much appreciated.
The text was updated successfully, but these errors were encountered: