Resize many images at once makes app unresponsive

I have…

  • [ ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [x] Performance issue
  • [ ] Documentation issue or request

Current behavior

When loading a number of assets (preview images in SquidEx, or load them on a gallery page with a specific size, e.g. ?width=500&height=500&mode=max), say 50 images - the app gets unresponsive for several minutes. CPU goes to 100% and if the Azure app service runs out of memory, it crashes and restarts SquidEx.

Expected behavior

Image resize function would queue assets so that it doesn’t take all available resources. Maybe it can be implemented with a max number of continuous resize processes appsettings parameter?

Minimal reproduction of the problem

Upload tens of images (say 50 x 5-10MB images on a Azure B2/B3 app service plan). Go to a page that need to resize all.

Environment

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: All that I have tried (At least 4.3 and dev-4827)

Good point and good catch.

Image resizing is very performance heavy, thats true, indeed.

Hi, this is a potential fix: https://build.squidex.io/Squidex/squidex/4838