Skip to content

Chore: Improve performance by using storage api #342

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zoltanbedi
Copy link
Member

@zoltanbedi zoltanbedi commented Jun 13, 2025

This PR changes the way how we retrive the response from BQ. The default behavior used http in the client with a 10mb limit. So in order to get a 100mb response it had to do the roundtrip 10x times, that is costly. In this PR I enabled the storage API that uses grpc under the hood with a 128mb response limit by default.

Before After
before after

How to test:

Use the data source from the plugin-provisioning repository and run the following query

SELECT * FROM `raintank-dev.bitcoin_blockchain.blocks` LIMIT 10

Without this PR the query execution takes 1m with the changes it takes 8s.

Fixes #341

@zoltanbedi zoltanbedi requested a review from a team as a code owner June 13, 2025 13:58
Comment on lines 33 to 34
// This is called after a query run from SQLDS but we don't want to close the connection here
return nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are not closing the connection here, where are we closing it?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Also can we add info on why don't we want to close it here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more info there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Performance: Getting large response >100mb is slow
3 participants