8000 Extend DatasetResourceProvider to create hierarchical groups with many subgroups · Issue #471 · keycloak/keycloak-benchmark · GitHub
[go: up one dir, main page]

Skip to content

Extend DatasetResourceProvider to create hierarchical groups with many subgroups #471

Closed

Description

@eatikrh

Description

We have observed some performance issues with Admin Console groups where there are many subgroups: Paging through the subgroups has some issues while paging through top level groups were fine. This may be related to the fact that DatasetResourceProvider only created top level groups and this case is well tested.

Discussion

No response

Motivation

We would like to be able create hierarchical group structures to help us test with various scenarios with Admin Console/Groups navigation and search.

Details

The paging of the subgroups issue has mostly been addressed by #21520 We still would like to have a way to create data that will help testing performance of partial searches on group names and their UI components. A similar issue exists with Admin Console/Identity Providers but this issue is to address only the groups.

We are proposing to extend the DatasetResourceProvider with an extra boolean parameter in " createGroups" method. This boolean parameter could be called "hiearchicalGroups" and would have a default value of false to ensure backward compatibility. If "hiearchicalGroups" is "true" than the first group created would the be parent group of the rest of the groups created. This would mimic the one case that lead to performance issues in our experience. Alternatively, we can also define a depth parameter of which value would denote the first number of groups to be direct subgroup of the prior group, and the remaining groups being the leaf subgroups of the "depth"th group. The "depth" would have a default value of "1" meaning that createGroups method would create only on parent group; if the "hiearchicalGroups" is false then the "depth" parameter would not be operative.

Activity

  1. mposolda commented on Aug 8, 2023

    @mposolda
    Contributor

    I vote for depth approach to allow creating groups at multiple levels. Not just limit to 2 levels. So something like:

    /**
      * If countGroupsAtEachLevel is 1000 and depth is 1, then this creates 1000 top levels groups without any subgroups
      * If countGroupsAtEachLevel is 10 and depth is 3, then this creates 10 top level groups, each having 10 subgroups (level 2) and each of them having another 10 subgroups (level 3). So 1000 groups in total
      */ 
    createGroups(int countGroupsAtEachLevel, int depth) {
       // Backwards compatibility
       if (depth == null) depth = 1;
      // Implementation here...
    }
    
  2. eatikrh commented on Aug 8, 2023

    @eatikrh
    ContributorAuthor

    This sounds good!

  3. added a commit that references this issue on Aug 16, 2023
    db3d7c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0