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

Return cached data source schema when available #4934

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

gabrieldutra
Copy link
Member

What type of PR is this? (check all applicable)

  • Other

Description

This PR updates the Data Source schema handler to immediately return cached results when they are available.

Related Tickets & Documents

This is a follow up for #4797

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

--

@gabrieldutra gabrieldutra requested a review from arikfr June 1, 2020 18:42
}

function getSchema(dataSource, refresh = undefined) {
if (!dataSource) {
return Promise.resolve([]);
}

const fetchSchemaFromJob = (data) => {
return sleep(1000).then(() => {
Copy link
Member Author

@gabrieldutra gabrieldutra Jun 1, 2020

Choose a reason for hiding this comment

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

I also removed the first request sleeping time, from a few tests a good portion of the results would be done already in the first request without the sleeping time

@arikfr arikfr merged commit 100c7be into master Jun 2, 2020
@arikfr arikfr deleted the schema-cached-results branch June 2, 2020 08:26
@arikfr
Copy link
Member

arikfr commented Jun 2, 2020

Nice, you can indeed see the improvement even without the backend changes. 👍

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

Successfully merging this pull request may close these issues.

2 participants