-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up BETYdb API #516
Comments
Please use the pagination of APIs to implement this. Its a standard practice. Please check this link for some detail- You can use this Gem to get the standard implementation- |
@Luckn0wLe0pard if we implemented pagination, would it require sending one request per page, e.g. appending |
Could you please provide the database schema and how exactly the query is being performed? |
@gauravsoti1 the schema can be found at https://www.betydb.org/schemas?partial=relationships. Can you clarify what information you are looking for with 'how exactly the query is performed'? |
Well, you need to implement pagination in every API since the response size needed can be very big and sometimes the client might not be ready to either- Pagination is the preferred way. { Since the call is slow regardless of this, maybe we can find the root cause by analysing the schema and call stack, looking at where the maximum time is being spent. |
Also looking at the code, the search results come from here- Clearly the search is performed over too many fields which is making it slow.
The time for client can be reduced by two ways- |
By speed up, I mean, to within an order of magnitude of an SQL query
This should resolve within a minute if
limit=none
https://terraref.ncsa.illinois.edu/bety-test/api/beta/search?key=9999999999999999999999999999999999999999&limit=1Two suggestions I've heard.
Completion Criteria
https://terraref.ncsa.illinois.edu/bety-test/api/beta/search?key=9999999999999999999999999999999999999999&limit=none
The text was updated successfully, but these errors were encountered: