Joomla 3/4 asks for stats collection after installation.
A user can answer with a click on "NEVER" button
However this just sets a flag in the params of the plugin
The plugin is then disabled on clicking NEVER, so that it doesn't take up any processing time/power/cpu/ms on page load ever again to ensure Joomla remains running a peak performance but the user has the option to reenable the plugin at any time
Don't store the NEVER as a param, because if the plugin is enabled again, you want it to ask the question again so that ALWAYS or ONCE can be chosen.
The PlgSystemStats plugin loads on every page load, runs some checks, takes some time, and in the end doesn't even send stats because we have said never.
There are 7 different if
statements run in onAfterInitialise/onAfterDispatch, several of these have 2 conditions to check, objects to retrieve etc...
Retrieving the params from the database is an extra db query that's not needed if NEVER is selected.
Labels |
Added:
?
|
Could just throw in a SQL query here
joomla-cms/plugins/system/stats/stats.php
Line 157 in d0b4022
Presumably it should also therefore be unpublished if a user selects to send data once immediately after the data is sent
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-15 20:45:47 |
Closed_By | ⇒ | PhilETaylor |
Makes sense. But no idea how to modify as it requires a major rewrite.