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

Rendering large trees slowed due to lack of permission caching #4425

Closed
TheWitness opened this issue Oct 16, 2021 · 3 comments
Closed

Rendering large trees slowed due to lack of permission caching #4425

TheWitness opened this issue Oct 16, 2021 · 3 comments
Labels
bug Undesired behaviour performance Performance related affects big sites resolved A fixed issue
Milestone

Comments

@TheWitness
Copy link
Member

Describe the bug

As an extension to the simple permissions detection, we should also cache those decisions so that users can have a better experience on large systems.

Expected behavior

Cacti should always manage performance and security well.

@TheWitness TheWitness added bug Undesired behaviour performance Performance related affects big sites labels Oct 16, 2021
@TheWitness TheWitness added this to the v1.2.19 milestone Oct 16, 2021
TheWitness added a commit that referenced this issue Oct 16, 2021
Rendering large trees slowed due to lack of permission caching
@TheWitness TheWitness added the resolved A fixed issue label Oct 16, 2021
@TheWitness
Copy link
Member Author

This change is currently being tested.

TheWitness added a commit that referenced this issue Oct 16, 2021
This adds a faster permission check for Graph Templates
@TheWitness
Copy link
Member Author

Okay, in testing, the initial Graph Tree page Template permission check went from 8+ seconds to 0.8 seconds. Success. Still need more QA.

TheWitness added a commit that referenced this issue Oct 16, 2021
It turns out that SELECT DISTINCT is very expensive vs. SELECT something, COUNT(*) AS something ... GROUP BY something
@TheWitness
Copy link
Member Author

One additional modification today based upon an audit of the SQL.

TheWitness added a commit that referenced this issue Oct 22, 2021
This is the last optimization related to this bug fix.
TheWitness added a commit that referenced this issue Oct 26, 2021
The simple permissions would not take affect due to many calls to get_allowed_devices() not including the user, for example `tree.php?action=edit`
TheWitness added a commit that referenced this issue Oct 26, 2021
The cache was loaded, but the last loaded date was not set.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour performance Performance related affects big sites resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

1 participant