REST API data retrieval very slow

The REST API I am testing has a slow return of JSON data for the report I am retrieving.

It can take 1 min or more to get the data.

I have two identical pages using List Component to display the data when it arrives using the web page emulator. When I click navigation to go to the page, I get a blank screen area where the list component would display until the data arrives.

  1. Is there a cache option to load the list component with stale data until the new data arrives?
  2. What event should I use to display a spinner, or better yet, a countdown to the user until the data arrives?

Also until I added a set appvar with the datavar logic, I would not get any data. I am not using the appvar but it would not work without setting an appvar. Reference With the 4.x runtime the global page does not load data into a collection variable | Voters | AppGyver

Hmm, have you checked if the rest api call fails once before trying again, or just takes a long time the first time?

  1. You could cache using local storage – there are a lot of threads on this on the forums linking to each other, you could start looking into it e.g. from here Local storage usage
  2. Instead of an event, I would hide a spinner after the “get collection” flow finishes
  1. no failure swagger query is slow but not as slow as apgyver. the query is db intense gathering info for a report.

  2. every page accessing this info goes blank then eventually is data populated. it seems that no page will read a previously loaded datavar before it is reloaded and the appvar i loaded to get data to work can not be substituted for the datavar. always shows incompatible.

Hmm, would it be possible to get the data in batches by using paging or similar?

Data variable content is lost when page is removed from stack (in web every time page is left and in mobile when you go back from the page, and each data variable exists only on that page, so an app variable should be used. Sounds like there is some kind of a schema mismatch – you can try to find the difference between the schemas and fix it, or just populate the data variable from the app variable via formula (ignoring the warning that schema does not match).

The API finest resolution is 1 hr of data. Don’t ask why it just is and it creates a lot of data. Slow to update.

I have put it in to an appvar with a 5 min update timer on the global canvas. Then I only use the appvar and formulas in the rest of the app. Real time data still lags but not the access to the appvar. I don’t see any way to reduce the amount of data.

We can close this one.