I am designing an app that will be using various SharePoint lists as data sources. Some of these lists will not exceed 60-200 items. While others could go as high as 10000. For this reason, I am trying to determine what will be the best path forward from a variable standpoint. Most of this data will sit in galleries. One screen in particular is task tracking which has parent tasks as a gallery and a secondary gallery within it to show child tasks.
Currently, "Onstart" takes care of loading all my SharePoint lists into variables but once I started playing with my larger data sets, I had to begin working with delegation..... No big deal, fixed some columns that did not support delegation, updated my data sources, yadda yadda yadda. At that point, I started referencing the data source directly in the gallery.items formula instead of a variable representation of the SP list.
My question is, should I just use delegation across my whole app and reference the data sources directly in my galleries? Or should I try and load what I can into variables "OnStart", while using delegation on a needs basis i.e. when I know the data source will exceed the 2000 hard limit? Or should I "OnStart" load the filtered data sources as variables and use that for my various galleries?
Any best practices/recommendations are welcome :).