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

[SQL Lab] Fix TableSelector perf for large option sets #7868

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Jul 13, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

If you have a large number of tables with a single schema (we have 28k in one of ours), it would take about 10 seconds to load the table selector. This was due to generating the search index, tokenizing, and doing other search-y related things. It turns out that getting rid of the indexing and adding ignoreAccents={false} (the same thing as #7791) improves the loading speed (down to under half a second) without hurting the search speed.

TEST PLAN

  • ensure searching for tables in sql lab still works
  • see that it's faster!

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@graceguo-supercat @michellethomas @khtruong @mistercrunch

@etr2460 etr2460 force-pushed the erik-ritter--table-selector-perf branch from 4f7fe94 to 0bffc15 Compare July 13, 2019 00:24
placeholder={t('Select table or type table name')}
autosize={false}
onChange={this.changeTable}
filterOptions={this.state.filterOptions}

Choose a reason for hiding this comment

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

there is a unit test for filterOptions prop. are you sure to remove it?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, fixed!

@khtruong
Copy link
Contributor

Does this get rid of autocomplete?

@etr2460
Copy link
Member Author

etr2460 commented Jul 22, 2019

@khtruong nope, autocomplete still works as before.

@etr2460 etr2460 force-pushed the erik-ritter--table-selector-perf branch from 0bffc15 to 28f591a Compare July 22, 2019 16:30
@graceguo-supercat graceguo-supercat merged commit 7a1dcaa into apache:master Jul 22, 2019
@etr2460 etr2460 deleted the erik-ritter--table-selector-perf branch July 22, 2019 21:39
etr2460 pushed a commit to airbnb/superset-fork that referenced this pull request Jul 22, 2019
@codecov-io
Copy link

Codecov Report

Merging #7868 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7868      +/-   ##
==========================================
+ Coverage    65.8%   65.83%   +0.02%     
==========================================
  Files         461      461              
  Lines       22210    22210              
  Branches     2425     2425              
==========================================
+ Hits        14616    14621       +5     
+ Misses       7473     7468       -5     
  Partials      121      121
Impacted Files Coverage Δ
superset/assets/src/components/TableSelector.jsx 84.16% <100%> (ø) ⬆️
superset/db_engine_specs/postgres.py 95.45% <0%> (+22.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee3430c...28f591a. Read the comment docs.

alex-mark pushed a commit to alex-mark/incubator-superset that referenced this pull request Jul 29, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants