Skip to content
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

Boost default page size for /assets/ endpoint #1907

Open
yarikoptic opened this issue Mar 25, 2024 · 1 comment
Open

Boost default page size for /assets/ endpoint #1907

yarikoptic opened this issue Mar 25, 2024 · 1 comment
Labels
performance Improve performance of an existing feature

Comments

@yarikoptic
Copy link
Member

Originally suggested as partial mediation to workaround

and (not really) discussed on slack. ATM we default to 100 assets, it leads to the need to page through 576 pages! If we increase to 1000 assets per request -- we reduce number of queries 10x fold. And that is already how e.g. https://neurosift.app does it -- sets page_size to 1000 (and stops on 10 pages ATM).

I think it would be really easy to test timing/performance to quantify benefit and "PR" should be quite easy to do .

@yarikoptic yarikoptic added the performance Improve performance of an existing feature label Mar 25, 2024
@yarikoptic
Copy link
Member Author

FWIW, I have adjusted original gist from #1891 (comment) to include explicit page_size, it is https://gist.github.com/yarikoptic/314f9f419c7203bcc40331571cacf693 and here are timings for 100 (corresponds to default) and 1000:

100:

response_times-page_size=100

1000:

response_times-page_size=1000

so seems to have the same runtime pretty much but throughput should be x10 more if we are getting 1000 assets at once I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improve performance of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant