Hnto
Posts: 0
Joined: Fri Jan 10, 2014 3:40 pm

RESTservice listview slow

A different problem I'm having is also trying to show an alert when the data collected from the RESTservice is less than 1. I've tried to use the code "data.length == 0" but that doesn't seem to work. I put this code in the Succes event from the data view.

Hnto
Posts: 0
Joined: Fri Jan 10, 2014 3:40 pm

RESTservice listview slow

Regarding data pagination: this option only works if the api you are receiving the data from supports 'limit' and 'skip', am I right?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

RESTservice listview slow

  1. Please check the console...
    1. No, this works for all services.
Hnto
Posts: 0
Joined: Fri Jan 10, 2014 3:40 pm

RESTservice listview slow

Hello Katya, regarding 2 (this works for all services). I have an api that outputs data in xml format and I extract this data via RESTview, but when I add the two parameters limit and skip, the data still outputs more than the number I fill in in limit and skip.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

RESTservice listview slow

Does it work (limit & skip) when you do a curl command?

Hnto
Posts: 0
Joined: Fri Jan 10, 2014 3:40 pm

RESTservice listview slow

Hello Max, I don't use the Appery database. My API is on a website that's made with PHP to output data from a MYSQL database into xml format. So that's why I don't think limit and skip is possible. I've tried limit and skip in a curl command, it doesn't work either.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

RESTservice listview slow

When you do a select against your database, you need to limit the number of objects you retrieve to send back to the client. I'm not sure there is any other way to make it work faster.

Hnto
Posts: 0
Joined: Fri Jan 10, 2014 3:40 pm

RESTservice listview slow

I found a solution that might work, but I don't know how to use appery code to do this. What I want is to count how much data is available with 'data.length' and when the data is more than 5, for example, it breaks the articles into seperate pages. I could use custom javascript to do this, but is there any appery code available for this?

Return to “Issues”