Sorry to resurrect a dead thread here, but I ran across this and thought I’d provide a little more detail.
Performance is a combination of many things, of course. The biggest culprit in this instance (updating sheets) is the add-on trying to update the sheet a bunch while it is doing formula re-calculations. This situation can be exacerbated both by the process we use to update the sheet as well as the quantity and complexity of formulas on the sheet. Side note: interestingly, the amount of data on the sheet or being imported to the sheet isn’t itself so much a problem; it just adds more for the formulas to dig through during a re-calculation.
As to why the number of accounts were an issue: we were initially iterating through each account and updating transactions for each account before moving on to the next one. This would mean that after the first account, Google Sheets started recalculating the formulas and everything slowed waaaay down. Now I believe we pull all the information from all the accounts first then try to add all the new data at the end of the process and hope it all gets there before the sheet can start recalculating.
This is a trade-off. It helps some with performance (it helps a LOT with some edge-cases - complex sheets w/ lots of accounts) but has other undesirable traits – for example, it would mean that any kind of error in the process (even on account 39 of 40) would prevent any transactions from being filled to the sheet.
There are definitely things Google could do to help us out (temporarily pause recalculation, for example), but I don’t want to throw Google Sheets under the bus here. Ultimately, this is a limitation of how we’re choosing to build the product. We’ve built prototypes of these update processes that work shockingly fast on very large datasets. However, a product strategy centered around those designs looks a bit different (smaller, modular add-ons w/ simpler spreadsheets) than what we are currently building (application-like experiences in sheets w/ more integrated feature-sets).
Hope this provides some useful - or at least interest - context.