MID-10972 Improve login and self-dashboard performance#601
Open
MID-10972 Improve login and self-dashboard performance#601
Conversation
…d repeated nested resolution
…apper initialization
1azyman
requested changes
Apr 9, 2026
Member
1azyman
left a comment
There was a problem hiding this comment.
* Add documentation
* New static methods seem to be unused (only via reflection api), short explanation would help - if we don’t find nicer solution
* DashboardWidgetRuntimeInspector, AssignmentPanelRule, WidgetFocusTrimContribution, etc…
* Get rid of PageBase parameters where possible
* Use MidpointApplication.get().getSomeSpringBean()
* Use PrismContext.get()
* Move DashboardWidgetRuntimeInspector.trimFocus method to DashboardWidgetRuntimeInspector.TrimPlan and make it non-static
* Personally, I’m not happy about the reflection magic calling createAssignmentCustomizeQuery and contributeFocusTrimPlan, but I couldn’t figure out anything better yet
* One idea is to create DashboardWidgetPanelRegistry where all panel classes will in static block register Function<AssignmentPanelRule, ObjectQuery> to a map with panelId and something similar for contributeFocusTrimPlan
| String MIDPOINT_HOST_NAME_PROPERTY = "midpoint.hostName"; | ||
| String MIDPOINT_HTTP_PORT_PROPERTY = "midpoint.httpPort"; | ||
| String MIDPOINT_MODEL_SECURITY_POLICY_ORG_TREE_IN_OID_BATCH_SIZE_PROPERTY = | ||
| "midpoint.model.securityPolicy.orgTreeInOidBatchSize"; |
Member
There was a problem hiding this comment.
I propose to change property name to midpoint.model.orgTreeSearchWidthBatchSize as it's related to model object resolver (right now only used for security policy search)
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
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.
Overview
Improve login and self-dashboard performance by reducing redundant work during:
Main techniques:
These changes reduce repeated repository calls and heavy wrapper initialization
while preserving existing behavior via fallback paths.
Make org-tree inOid batch size configurable
Introduced configurable batch size for org-tree
inOidsearch (previously hardcoded).midpoint.model.securityPolicy.orgTreeInOidBatchSize50Benefit: allows tuning org-tree traversal performance per deployment.
Add batched prefetch for login assignment targets
Batch-fetch assignment target objects during login-mode evaluation.
How it works:
AssignmentEvaluatorBehavior:
Result: eliminates repeated per-assignment resolution calls during login.
Reuse resolved targets across assignment evaluation
Add evaluator-local cache of resolved targets (keyed by type + OID).
Behavior:
Result: reduces repeated nested target resolution while keeping fallback behavior intact.
Avoid duplicate GUI profile collection (reuse login inputs)
Reuse GUI profile inputs collected during login instead of recomputing them.
Changes:
LoginGuiProfileInputstoGuiProfiledPrincipalGuiProfileCompilerResult: removes duplicate GUI profile collection work.
Pre-trim assignments in self dashboard
Trim assignments before wrapper initialization to avoid unnecessary processing.
Scope:
How it works:
userAllAccessesBehavior:
Result: removes assignment-wrapper hotspot from dashboard rendering.
Summary
These changes:
All optimizations preserve correctness through existing fallback mechanisms.
Performance impact
Test scenarios:
Results
Notes