-
Notifications
You must be signed in to change notification settings - Fork 11
remove cache from big pages #266
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
Conversation
acf2239
to
2b66dab
Compare
913756e
to
44ae118
Compare
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
eb4fed7
to
bc6d635
Compare
7714d1b
to
395d7aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes the performance of user management and PI management pages by removing dependency on Redis cache and implementing more efficient LDAP queries. The changes replace cached object initialization with direct attribute queries, significantly reducing LDAP overhead.
Key changes:
- Replaced
UnityUser->getGroups()
withgetPIGroupGIDs()
to return group IDs instead of full objects - Optimized user-mgmt.php to query only necessary user attributes instead of initializing full user objects
- Optimized pi-mgmt.php to query PI group owner attributes directly instead of creating objects for each PI group
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
webroot/panel/groups.php | Updates group iteration to use GIDs and create UnityGroup objects on-demand |
webroot/panel/account.php | Refactors to use getPIGroupGIDs() and converts mixed PHP/HTML to echo statements |
webroot/admin/user-mgmt.php | Replaces user object initialization with direct LDAP attribute queries |
webroot/admin/pi-mgmt.php | Replaces PI group object initialization with direct owner attribute queries |
test/functional/AccountDeletionRequestTest.php | Updates test assertions to use new getPIGroupGIDs() method |
resources/lib/UnityUser.php | Refactors getGroups() to getPIGroupGIDs() returning array of group IDs |
resources/lib/UnityLDAP.php | Adds new methods for efficient attribute-only LDAP queries |
resources/init.php | Adds base DN parameter to LDAP constructor |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
7e3dec9
to
be1749c
Compare
be1749c
to
402f18e
Compare
Fixes the slowness issues that created the need for redis cache.
user-mgmt
andpi-mgmt
should no longer be relying on redis at all.UnityUser->getGroups
still uses cache by default, but these changes should enable us to remove cache later.UnityUser->getGroups()
->UnityUser->getPIGroupGIDs()
:pi-mgmt.php
:UnityUser
object for each PI group owneruser-mgmt.php
:UnityUser
object for each useralso, replaced
<p>
<br>
formatting for group members inuser-mgmt.php
with a nested table.before:
after: