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

[4.4][Performance] Fix duplicated DB queries for non-existing asset #44033

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Sep 8, 2024

Summary of Changes

Fix duplicated DB queries for non-existing asset.

Testing Instructions

Enable debug and debug Query in the debug plugin.
Login in administrator section as manager.
Open Articles list table.
Check amount of DB queries in debug panel.

Or run folowing code, in templates/atum/index.php.

for ($i = 0; $i < 100; $i++) {
    $app->getIdentity()->authorise('core.edit', 'com_content.category.1');
}

Actual result BEFORE applying this Pull Request

Around 55.

With testing code it is around 155 or more;

Expected result AFTER applying this Pull Request

Around 45

With testing code it is around 45;

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 Fedik added bug Small A PR which only has a small change labels Sep 8, 2024
@tkuschel
Copy link
Contributor

tkuschel commented Sep 8, 2024

You can also fix the strange comment "// Else we have to do an extra db query to fetch it from the table fetch it from table." with this PR.

@Fedik
Copy link
Member Author

Fedik commented Sep 8, 2024

done

@fgsw
Copy link

fgsw commented Sep 9, 2024

I have tested this item ✅ successfully on 892c892

Without Pull Request: 74 Queries
With Pull Request: 47 Queries

Test installed Multilang (de, en, fa)- and Blog Sample Date (14 Articles).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44033.

@Hackwar
Copy link
Member

Hackwar commented Sep 10, 2024

I have tested this item ✅ successfully on 892c892


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44033.

@Hackwar
Copy link
Member

Hackwar commented Sep 10, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44033.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 10, 2024
@Hackwar Hackwar removed the RTC This Pull Request is Ready To Commit label Sep 10, 2024
@laoneo laoneo added this to the Joomla! 4.4.9! milestone Sep 10, 2024
@laoneo laoneo merged commit 02442d9 into joomla:4.4-dev Sep 10, 2024
4 checks passed
@laoneo
Copy link
Member

laoneo commented Sep 10, 2024

Thanks!

@Fedik Fedik deleted the fix-empty-asset-cache44 branch September 10, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PR-4.4-dev Small A PR which only has a small change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants