r/Scriptable • u/Tasty-Albatross-5624 • Oct 17 '21
Discussion Widget Stack memory limit
Hi,
I'm trying to understand Scriptable's memory limitation on the number of stacks. I did a simple test with this piece of code:
const max = 175; const widget = new ListWidget(); widget.setPadding(0, 0, 0, 0) widget.addText(max.toString()); let main = widget.addStack(); main.layoutHorizontally();
for(let i = 1; i < max; i++) { let s = main.addStack(); s.addText(i.toString()); s.borderWidth = 1; s.borderColor = Color.red(); main.addSpacer(1); }
Script.setWidget(widget);
When I exceed 165 stack the widget no longer updates.
I also use Widgy to make other widgets and we don't seem to face that kind of limitation.
Is the limit in memory or in number of layers?
Thanks.
View all comments
1
u/icsat Nov 11 '21
imho the limitation is in memory. I am discovering similar problems and using far less stacks in my widgets. Also I discovered different behavior with the same widget on different devices.