Help speeding up my Gallery

You’re connecting to your Google Sheet every time you display an image. So if you have 30 images, that’s 30 separate connections. You need to avoid that.

Also, I’m doing something similar in my Photo Journal app. One way I speed things up is by hiding and showing components instead of cloning and removing them. If it makes sense to do it that way, you can create all of the components manually in the screen and then just hide the ones that would be blank (that are beyond the index of the gallery length). That may speed things up, too. It’s a major change to your project so I would only undertake it after you’ve eliminated other things that might be slowing it down.

I use the “seconds since 1970” block in the Device drawer to time how long certain parts of my project take to run. See this post:

You can “bookend” sections of your blocks and then make minor changes (e.g. remove a block) to see how it affects the timing.

3 Likes