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

Explore: typeahead and render performance improvements #13491

Merged
merged 4 commits into from Oct 4, 2018

Conversation

davkal
Copy link
Contributor

@davkal davkal commented Oct 2, 2018

Various improvements to speed up the query UX:

  • dont pass down new objects and arrays from parent render function
  • purify components
  • lowered debounce from 300 to 100ms
  • manual equality checking of complex objects
  • Prevent Explore from updating when typing query

Before: lots of components needed to render when typing

screen shot 2018-10-02 at 15 33 21

After: fewer components need to render, and a lot fewer commits (flushing react tree to DOM)

screen shot 2018-10-02 at 15 37 01

@davkal
Copy link
Contributor Author

davkal commented Oct 2, 2018

This is best looked at on per-commit basis. I'll rebase once the review is done.

@torkelo
Copy link
Member

torkelo commented Oct 3, 2018

Cool, hard to review it but looks good :)

Can't really interpret the screenshots, looks like render duration went from 12ms to 14ms :)

- Lower debounce
- refactor suggestion selection
- make Portal pure
- use prev suggestions object if suggestions are the same
- remove `edited` property of query objects
- query object semantics changes to be initial values only
- resetting or externally modifying a query is done via giving it a new
  react key, which replaces the row completely
- query changes while typing are sent up to Explore to be saved in a
  local property that is not part of the component state (prevent
  control circle)
- all Explore functions using the queries must access the local property
  for current values
@davkal davkal merged commit 406b614 into master Oct 4, 2018
Observability (deprecated, use Observability Squad) automation moved this from In progress to Done Oct 4, 2018
@davkal davkal deleted the davkal/explore-perf branch October 4, 2018 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants