Please don’t show 4 items on the repeating panels when there are more than 2 nested levels.
Showing 4 items per level can end up with trying to show 256 or 1024 items. The result is at best a long wait, sometimes a corruption of the IDE which requires a hard refresh.
I was finally able to create an app with a data grid with its own repeating panel, then add a repeating panel to its row template down to 4 levels. The resulting app is great: very easy to use and very fast at run time.
The problem is that it’s impossible to do it from the IDE. I had to work around the performance limitation by pulling, editing the .yaml and .py files on my computer and pushing. Obviously editing the yaml file is dangerous, and a few times I corrupted the app, so I had to revert to an older version and try again.
This problem has already been mentioned here: Performance of IDE with deeply nested Repeating Panels.
The suggested solution works (it’s what I usually do), but showing 1 item instead of 4 would allow to use the IDE and make Anvil even greater than it is already!
Thanks for flagging this - we have now improved things significantly, and you should see the updates in the next couple of days! Going forward, you will see each RepeatingPanel show multiple instances (now 3) of its children only the first time it is displayed. This means that you will still be able to see the expanded structure of nested RepeatingPanels, but you won’t get unnecessary subsequent repetitions.
Keep an eye out for the update - feedback welcome!
2 Likes
Update: This has now been released. Please give it a try and let us know what you think.
Thanks for the update. I have tried it and it works, but…
I reverted the code that I had modified so I could use the IDE (I had set item_template: ''
in all the repeating panels in the yaml file so they wouldn’t find the templates and waste time trying to render them, then I had added the import and the setting of item_template
before the self.init_components
).
Now the performance problem is gone, but I had three problems:
- The deeper you go the more transparent the content is. The result is that you don’t see what you have.
- After playing with it for 2 minutes the form froze and I had to refresh the browser. I was not able to reproduce this problem, I will let you know if it happens again.
- The breadcrumb above the form spills out of the designated space (this is a minor problem, but it doesn’t look good)
The snapshot shows the invisible links inside a 4 level deep repeating panel.
Thanks @stefano.menci! Am I right in saying that these are not new problems, just problems that you never got as far as seeing with the previous behaviour? We haven’t changed anything about opacity, for instance…
Hi @daviesian, yes, these are old problems. I was aware of them, but I never bother reporting them because they were hidden by the other elephant in the room.
Ok, thanks, we’ll look into them!