-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add an option to limit the number of max results #786
Conversation
This PR should become green as soon as #783 has been merged. |
Hi ,interesting. Would you mind creating a sandbox for the usecase? There would also need to be a indicator that the currently shown items are not all the items |
be69575
to
0d3c705
Compare
Demo is added :-) |
For the indicator - I would actually leave that to the calling application. This is very much individual on how to show it. Or what do you think? The demo also includes an example for it. |
Yes I saw that you added a demo but can you create a demo where the problem that you mentioned problem is present? |
Well this will be difficult. This is a nested tree structure with > 10000 items. When analyzing why it feels sluggish then, it boils down to opening the tree and rendering those items - it is just too much. |
So its not necessary the search count but the amount of stuff rendered aka the nested tree views? and with the reduced numbers you just reduce the items within the tree? it feels like this it is just a hotfix for an underlying problem honestly. |
Yes exactly. On my instance I set it to 150, telling the user to refine it. Otherwise the browser will render > 5-10 seconds, turning the whole page unresponsive. |
@klassm I am not sure if restricting the search results is the correct way of handling this particular case. This seems more like a hotfix for your specific deeply nested tree view. And the way you proposed to change the filter does not seem intuitive, since the filtering itself is not the problem.
But again, maybe we should look at the actual problem: the tree depth, which is the primary problem. What is your current hacky workaround? |
Well I guess the tree data is the one thing I cannot provide - and actually it is probably also not helpful. It is just a huge clunky amount of nested data. |
0d3c705
to
5dd2d9a
Compare
5dd2d9a
to
187494a
Compare
I've also changed the implementation as you proposed, directly with a slice and the check in the data-manager.js. There is one red test though: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
Not sure how to go forward with this, not it is becoming stale :-) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
The idea is to provide an option to limit the number of results that can come back. The project where I use this library in partially renders 15000 rows. When > 150 rows come back from the search, it starts to stutter. Nobody has to use it, but it is kind of convenient to stop when a threshold has been reached and then report back to the user.