-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix for not retrieving all items when response has multiple pages of items #318
Fix for not retrieving all items when response has multiple pages of items #318
Conversation
Some sites have thousands of items. What's the performance going to be like in that case? |
This issue is specifically is about fetching all items filtered to the provided item name & doesn't fetch all items of a content type from the site. Yes, there could be multiple pages of items with the same name (like in the case of customer issue) & could be low of occurrence given the filter query but I believe we should be fetching all the results from the multiple pages of items despite the performance hit instead of just relying on the first page of items which could lead to unintended consequences. Please let me know of your thoughts on it, Thanks |
The point of the bug is that we want to return more than the first page, yes. But what is the performance like? Does it appear to hang? |
Not much in the limited testing I performed but it could, depending on the network latency for the requests, another quick option be to bump the default value of TSC_PAGE_SIZE to 500 to reduce the number of API calls for fetching all the pages of items, thoughts? |
that does sound like a great quick fix. We could do that and then take a bit more time on this one. |
This pull request includes significant changes to the
get_items_by_name
function intabcmd/commands/server.py
to support pagination and improve item retrieval. Additionally, comprehensive unit tests have been added to ensure the function's correctness under various scenarios.