reports
reports copied to clipboard
FB8832751: 30 MB memory limit for widgets is too low
- Date: 2020-10-29
- Resolution: Open
- Area: WidgetKit
- OS: iOS 14.1
- Type: Incorrect/Unexpected Behavior
Description
Currently, widgets are limited to only 30 MB of memory. This is usually fine for text, but a widget can contain an image, and 30 MB is nothing when it comes to images. This is especially problematic when you want to create multiple widget timeline entries, as you have to keep it to under 30 MB in total for all entries. In my “Photo Widget” (ID: 1532588789) app, I could barely do two timeline entries without going over the limit, and the images are not nearly as high resolution as the screen can display.
The low memory limit leads to both bad user-experience and bad developer-experience. The user suffers from wasteful battery usage as my widget has to be loaded for every other timeline entry and they get sub-optimal image resolution. The user also suffers from occasional widget crashes as it’s really hard to keep under the limit. Developer-wise, I’ve wasted so much time trying to keep the widget extension under the memory limit.
Since widgets are not reloaded that often, and phones these days have a lot of memory, I would strongly recommend reconsidering the current memory limit for extensions, especially for widgets.
Agree. Any more sophisticated image operations are not possible with this limit. I tried to implement simple "face cropping" feature using Vision framework with no luck.
I tried to implement simple "face cropping" feature using Vision framework with no luck.
I actually tried this a few months ago too and gave up.
did you manage to do it @sindresorhus @pykaso
No...