-
Notifications
You must be signed in to change notification settings - Fork 198
Deferred rendering further optimizations #227
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
|
Hmm. After merging this I only get "Nothing found..." as only option in my basic dropdrown test without any settings. Haven't investigated any further yet. |
Collaborator
Author
|
That's strange. Do you have a test to share with me? |
Owner
|
Even the most basic example doesn't work for me. Could be related to this or anything else committed after 1.4.0. Have you tried running 1.5.0 from NPM? |
|
@softsimon take a look at #235 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In this PR I put some extra options for even more aggressive optimizations of extremely large sets of options (>5000).
I found that it was not enough of what I did in my previous PR because as I thought the source of lag was only in rendering.
As it turned out after testing - it's not only there but in filtering as well.
Quite a bit of measurements before and after improvement to have some numbers (tested on real mobile devices):
So as numbers speaks the worst case scenario could get about 1.6s but most of the time the search feels instantaneous to the user after these optimizations.
To enable/control this optimizations there are a bunch of new settings which should be changed in order to enable it:
searchMaxLimit: Is used to limit a number of items being filtered in memory
searchMaxRenderedItems: Is used to further limit a number of items being rendered to the user
Besides those limits the filtering was tweaked to speedup the process: search results are now aggressively cached and reused as much as possible taking into account
searchMaxLimitsetting.Also after all of the optimizations the result was so good that I decreased number of min characters to trigger filtering to just 1 by default.
Here I will share my settings for optimized large sets of options I use just for reference:
Thanks