I have a custom API created with API express getting data from a MySql db. It takes too long to get the data on the screen. This is in the preview mode. Will it be the same in the app and if so how can I speed it up?
Thanks
I have a custom API created with API express getting data from a MySql db. It takes too long to get the data on the screen. This is in the preview mode. Will it be the same in the app and if so how can I speed it up?
Thanks
Hi TonyS,
Speed of getting data dependence on speed query to your SQL server
Well it's not a complicated statement and it's from a single table. Locally (on the server where it resides) it's very quick. Any other ideas why it could be slow?
Hello Tony,
Could you please clarify do you have multiple requests to your db? Also please detail how much data is transferred.
One request, a select query, which gets 7 fields from a table that has currently 1000 records based on an alphanumeric parameter. In some cases it might return 100 records max (containing the the 7 fields)
I'd be happy if the spinner would show whilst it gets the data. That way the user will know something is happening.
Hi Tony -
You can find posts on our forum about how to show/hide spinner while executing the service:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
Here's better idea, is there anyway to store the previous "fetched" records, like in a cache, whilst the new ones are returned. Just like Facebook does?
Thanks Illya, yeah showspinner() etc. but the app locks up so it doesn't show, that's the problem. I'll figure it out.
For such case you can use Model/Storage approach for this and store your data structure in storage which will replicate your service response model structure and you will have access to this records.
So this would allow the storage of multiple records of varying amounts in storage variables of the same name which would be recalled into label place holders until the service succeeds and replaces the fields with new data?