Skip to content

[5.0] Plugins: load language only when plugin it really needed. Performance optimisation.#40356

Merged
HLeithner merged 11 commits intojoomla:5.0-devfrom
Fedik:plg-disable-lang-autoload
Sep 17, 2023
Merged

[5.0] Plugins: load language only when plugin it really needed. Performance optimisation.#40356
HLeithner merged 11 commits intojoomla:5.0-devfrom
Fedik:plg-disable-lang-autoload

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Apr 10, 2023

in addittion to #40355 and #40309

Summary of Changes

Most of the plugins wasting a time for loading their language, while it may never used.
I have reviewed some system plugins, and changed $autoloadLanguage to manual loading, on specific event.

It still need some work, but need to wait when #40216 will be merged and upmerged :)

Testing Instructions

Apply patch, make sure the plugins translations still works.

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works

Link to documentations

Please select:

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

@Fedik Fedik marked this pull request as draft April 10, 2023 12:06
@Fedik Fedik changed the title Plugins: load language manually, only when plugin it really needed. Performance optimisation. Plugins: load language only when plugin it really needed. Performance optimisation. Apr 18, 2023
@Fedik Fedik added the Feature label Apr 18, 2023
@Fedik Fedik changed the title Plugins: load language only when plugin it really needed. Performance optimisation. [5.0] Plugins: load language only when plugin it really needed. Performance optimisation. Apr 23, 2023
Fedik added 2 commits May 22, 2023 18:18
 Conflicts:
	plugins/system/jooa11y/src/Extension/Jooa11y.php
	plugins/system/redirect/src/Extension/Redirect.php
	plugins/system/tasknotification/src/Extension/TaskNotification.php
@Fedik Fedik marked this pull request as ready for review May 22, 2023 15:56
@Fedik Fedik added the bug label Sep 6, 2023
@ceford
Copy link
Contributor

ceford commented Sep 14, 2023

I installed German, logged in to Admin with German selected, applied patch and got this:

Die zu ändernde Datei existiert nicht: plugins/system/logrotation/src/Extension/LogRotation.php

Same with English, with Patchtester the patch won't apply - error message:

The file marked for modification does not exist: plugins/system/logrotation/src/Extension/LogRotation.php


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

@brianteeman
Copy link
Contributor

@ceford
image

 Conflicts:
	plugins/system/logrotation/src/Extension/LogRotation.php
	plugins/task/updatenotification/src/Extension/UpdateNotification.php
@HLeithner HLeithner merged commit 643ad67 into joomla:5.0-dev Sep 17, 2023
@HLeithner
Copy link
Member

HLeithner commented Sep 17, 2023

I merge this since it seems a useful optimization and could be better tested in beta2 and easily fixed or reverted if a translation is missing.

thanks

@Fedik Fedik deleted the plg-disable-lang-autoload branch September 17, 2023 17:43
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.

6 participants