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

[5.3][Performance] Access Rules smart preload, reduce memory use and time for large sites #44078

Open
wants to merge 17 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Sep 14, 2024

Pull Request for Issue #43649.

Summary of Changes

Currently while checking access, the Access::preload() pulling everything from the access table.
It is neglectable for small sites, however for large sites it has huge impact on the site performance.

I added a new method for "smart preload", which allows to preload only needed items. And applied this method for most of the com_content views, where it make sense.

Testing Instructions

Create a site with 20k articles (more is better). Can use following plugin to generate random content https://github.com/Fedik/plg_sampledata_bigdata

Enable debug.
Open article detail or blog view.
Look for memory usage in the debug bar, and for time.

Actual result BEFORE applying this Pull Request

In my test:
memory usage around 45Mb
time 200-300ms

Expected result AFTER applying this Pull Request

In my test:
memory usage around ~12Mb
time ~100ms

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

@Fedik
Copy link
Member Author

Fedik commented Sep 14, 2024

Will rebase it after upmarge

@Fedik Fedik changed the title [5.3][Performance] Access smart preload, reduce memory use and time for large sites [5.3][Performance] Access Rules smart preload, reduce memory use and time for large sites Sep 14, 2024
@Fedik

This comment was marked as outdated.

@richard67 richard67 added Performance and removed bug labels Sep 15, 2024
libraries/src/Access/Access.php Outdated Show resolved Hide resolved
@Fedik Fedik changed the base branch from 5.2-dev to 5.3-dev October 5, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Joomla Permissions Issue - Slow Performance and Timeouts with Non-Super Users
6 participants