Scripted REST API vs Table API with regards to time

erlfos
Giga Expert

Hi

I have seen a lot of questions about what to use, Scripted REST API or Table API, and I have a good understanding of what each API can be used for. What I don't know is which API is faster. We have a Table API query which is currently gathering all the entries of one table and extracting about 20 fields from each entry. This query takes from 35-40 seconds and up to 60 seconds using the Table API. In the Transaction Log I see that most of the time is used by 'ACL time' (ACL execution time).

Would it be quicker to do this query using the Scripted REST API? How do scripted vs table API compare with regards to response time in general? Is it possible to reduce the ACL time somehow?

1 REPLY 1

Sonam Tiwari
Tera Guru

Hi @erlfos ,

 

In general,

Table APIs are much faster than scripted APIs as they revolve mostly around direct interactions with the database using CRUD operations.

But I have faced similar issues in the past where in case of Table API, most of the time was consumed by ACLs.
There are other factors as well like the number of records which was a large set in my case, system load etc.


Coming to reducing ACL time, ACLs with complex conditions, scripted logic to be evaluated involved ususally take up long.
If at all there are any unecessary ones that can be avoided, or simplified so that database querying is reduced and if few can be combined to handle the permissions then probably you can bring down the time taken.

Hope that helps a bit.