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

Fixed ListUserItemsRequest performance (#1035) #1037

Merged
merged 6 commits into from
May 10, 2022
Merged

Conversation

reisfmb
Copy link
Contributor

@reisfmb reisfmb commented May 6, 2022

The idea here was a bit more complicated... there are multiple instances of the ListUserItemsRequest class. Here they are:

UserItemsTreeGrid:

PrincipalBrowseFilterPanel:

So for instances where the necessary data does not depend on the count parameter, I simply set the count to 1:

For the remaining instances, I couldn't just set the counter to one, because the data used is actually the users, so by setting counter to N, we'd be showing only N users after some search for example.

Therefore my approach was to set them to 100, and only if the users scroll down the filtered data, then we'll request 100 + N, 100 + 2N, ... number of users.

Why request 100 + N, instead of requesting N and append the response the current data? Because this data comes from a search, so the N new ones might not have anything related to the old ones.

If approved, than I'd like to know how to add the "loading" effect, just like when loading through all users under an idProvider (loadChildren method), that's why this PR is currently a draft.

@reisfmb reisfmb requested a review from alansemenov May 6, 2022 21:39
@reisfmb reisfmb self-assigned this May 6, 2022
@reisfmb reisfmb changed the base branch from master to issue-1029 May 9, 2022 14:25
@reisfmb reisfmb changed the base branch from issue-1029 to issue-1045 May 9, 2022 19:59
@reisfmb reisfmb marked this pull request as ready for review May 9, 2022 20:00
@reisfmb reisfmb merged commit f3f3621 into issue-1045 May 10, 2022
@reisfmb reisfmb deleted the issue-1035 branch May 10, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant