Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
24ef7950
Commit
24ef7950
authored
9 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1549: batch load the identities
parent
cd95f275
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/group/ui/main/AbstractMemberListController.java
+16
-2
16 additions, 2 deletions
.../org/olat/group/ui/main/AbstractMemberListController.java
with
16 additions
and
2 deletions
src/main/java/org/olat/group/ui/main/AbstractMemberListController.java
+
16
−
2
View file @
24ef7950
...
...
@@ -615,14 +615,28 @@ public abstract class AbstractMemberListController extends BasicController imple
identities
=
new
ArrayList
<
Identity
>(
0
);
}
else
{
SearchIdentityParams
idParams
=
new
SearchIdentityParams
();
idParams
.
setIdentityKeys
(
identityKeys
);
if
(
params
.
getUserPropertiesSearch
()
!=
null
&&
!
params
.
getUserPropertiesSearch
().
isEmpty
())
{
idParams
.
setUserProperties
(
params
.
getUserPropertiesSearch
());
}
if
(
StringHelper
.
containsNonWhitespace
(
params
.
getLogin
()))
{
idParams
.
setLogin
(
params
.
getLogin
());
}
identities
=
securityManager
.
getIdentitiesByPowerSearch
(
idParams
,
0
,
-
1
);
List
<
Long
>
identityKeyList
=
new
ArrayList
<>(
identityKeys
);
identities
=
new
ArrayList
<>(
identityKeyList
.
size
());
int
count
=
0
;
int
batch
=
500
;
do
{
int
toIndex
=
Math
.
min
(
count
+
batch
,
identityKeyList
.
size
());
List
<
Long
>
toLoad
=
identityKeyList
.
subList
(
count
,
toIndex
);
idParams
.
setIdentityKeys
(
toLoad
);
List
<
Identity
>
batchOfIdentities
=
securityManager
.
getIdentitiesByPowerSearch
(
idParams
,
0
,
-
1
);
identities
.
addAll
(
batchOfIdentities
);
count
+=
batch
;
}
while
(
count
<
identityKeyList
.
size
());
}
Map
<
Long
,
MemberView
>
keyToMemberMap
=
new
HashMap
<
Long
,
MemberView
>();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment