You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working with the GetCommits method in the repository client, I noticed that the GetEnumerator function continues to fetch the next page if there are more pages available. This means that even if I request only 10 commits, it still retrieves up to 100 if they exist, resulting in unnecessary server calls. From what I understand, the MaxResults parameter limits the number of items returned but not the number of server requests. Is there a way to prevent fetching the next page?
One solution I can think of is this: add the missing "Page" property to the GetCommitsRequest, then check if that parameter was provided in the _startUrl. If so, don't get the next page. Thoughts?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
While working with the GetCommits method in the repository client, I noticed that the GetEnumerator function continues to fetch the next page if there are more pages available. This means that even if I request only 10 commits, it still retrieves up to 100 if they exist, resulting in unnecessary server calls. From what I understand, the MaxResults parameter limits the number of items returned but not the number of server requests. Is there a way to prevent fetching the next page?
One solution I can think of is this: add the missing "Page" property to the GetCommitsRequest, then check if that parameter was provided in the _startUrl. If so, don't get the next page. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions