Fix #104 dataframe histogram memoization #116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Memo was being set up on every call rather than once per instance, causing some UI features to be slow
e.g. https://app.zenhub.com/workspaces/single-cell-5e2a191dad828d52cc78b028/issues/chanzuckerberg/single-cell-explorer/104.
These were the only instances of memo not working correctly that I could find. Also, this issue does not affect cellxgene desktop as the bug was introduced during the TS migration.
Perf screenshots when clicking a CatVar drop down (following the steps to reproduce above).
![Screen Shot 2021-10-06 at 9 55 37 AM](https://user-images.githubusercontent.com/4804047/136250716-4121038b-8aa3-4da9-986c-0925a4420798.png)
Before
After
![Screen Shot 2021-10-06 at 9 53 51 AM](https://user-images.githubusercontent.com/4804047/136250730-93d970fe-dafc-47cc-98ee-4d43f34c07d9.png)
Reviewers
Functional:
Bruce
Readability:
Seve
Changes