Keep in mind that App Inventor will wait for a foreach or while loop to complete before continuing processing.
This means if your loop is plotting something on the Canvas then the plot will not appear until the loop exits.
In order to display items on a Canvas I generally use a Clock Timer event block to contain the blocks that will change the Canvas and set it's Interval to 0 for maximum processing speed.
I first enable the timer by setting it's Enabled property to true.
If you need to increment a counter index value you can do that inside the Timer block.
You can have an if block inside also to determine when to stop the Timer by setting Enabled to false
This touches on the idea that App Inventor really shines with it's many event-driven blocks.
The user does something then the app responds in some way with an event handler block (Canvas Touched, Button Click, etc.)
If you do use while or foreach limit their processing to a short amount of time -- I would say no more than 1 second.
If longer than that, you should use a Clock Timer.
---
hAPPy INVENTORing!
Scott