Skip to content

Conversation

@OffBy0x01
Copy link
Collaborator

@OffBy0x01 OffBy0x01 commented May 18, 2021

Page size of 100 was far too conservative. 250 will dramatically improve exec times for most users, whilst remaining manageable for resources with many results.

Average (of 10) time taken to get 1000 items, with varying page sizes:
page_size | Local to Blackduck
100 | 18.878
150 | 16.700
200 | 15.696
250 | 13.675
500 | 13.702
1000 | 13.736

Page size of 100 was far too conservative. 1000 will dramatically improve exec times for most users, whilst remaining manageable for resources with many results.
@skiyooka
Copy link
Contributor

Hmm, do you have any timings on how long typical queries take with 1000 elements? I choose 100 for projects, versions, codelocations, etc. as it took approximately 2-3 seconds (this was for HubInstance) to return when hitting a moderately loaded hosted server. I think that a page size where common queries return in under 5 (up to 10?) seconds tops is a potential goal. Anyway on my side I'll give Sage a whirl with the 1000 default and see how some of our servers respond.

Average time taken to get 1000 items, with varying page sizes: page_size | Local to Blackduck 100 | 18.878 150 | 16.700 200 | 15.696 250 | 13.675 500 | 13.702 1000 | 13.736
@OffBy0x01 OffBy0x01 changed the title Increase default page_size to 1000 Increase default page_size May 19, 2021
@skiyooka
Copy link
Contributor

I did some testing on my end (Sage works fine either way). Completely open to upping the limit to whatever makes sense.

@skiyooka skiyooka merged commit fc75ddd into master May 20, 2021
@skiyooka
Copy link
Contributor

I've updated this and merged it in as I would like to publish a new version of hub-rest-api-python to include this and the bearer token renewal fix.

@OffBy0x01 OffBy0x01 deleted the AR-Calder-pageSizeIncrease branch May 20, 2021 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants