Closed kentico-ericd closed 3 years ago
Improvements in
💡 Idea: Request all items at the start of the import (instead of calling getExistingItem
in a loop). The first request could potentially take a while, but reduces the number of API calls greatly.
https://github.com/Kentico/kontent-google-sheets-add-on/commit/b3e0795a0105fc893612d2624e9de270262340cc adds an option to cache all content items using the Deliver /items endpoint. This only works when trying to locate an existing item by name (external_id will still make a MAPI request since Deliver can't find that).
Caching the response from MAPI would be better, but that will require iterating through the pagination..
https://github.com/Kentico/kontent-google-sheets-add-on/commit/6c6625894729e0efcef7defe055dc16cfff036eb caches all content items from the MAPI endpoint, so we can now check cache whether we're updating items via name or external_id
GAS has an execution limit of ~5 minutes. Accessing services (ie reading from a Sheet) are performance intensive and we could save some execution time by possibly caching the data instead of reading cells in a loop.
Or, we could find a way to batch the import somehow.