Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.
A lot of duplicate SQL's and extra SQL's (15) because the loadUsers function and getUser function doesnt "share" the already loaded users. I think my fix works: I have moved the declaration of static $instances = array(); to outside the getUser function (and added self::) and added a cleanup of the array in the loadUsers function as the first line
$userIds = array_diff_key( $userIds, self::$instances );
Secondly, the maintenance of records in user_usergroup_map upon every load of the user object is very bad design, when can this be removed?
(libraries/user.php)
/* Temporary fix for Joomla! 3.2 when save user without groups array in object */
* @todo Should we remove these when Joomla! fixed their issue
STEPS TO REPLICATE:
1 Using site as guest and view an event
We aware with this, we have lot of duplicate queries, but we cant tweak them right now, since we need lot of times for this one, and afraid will effected to another functionality due we have another important task on our plate.
Does this answer cover both by the duplicate SQL and the user_usergroup_map maintenance problem?
I believe this is a fundamental wrong approach. To me - the core parts of the appliation must be solid and optimized before putting work in adding new features. Any new features will also be affected by these problems. Moreover; if you are not taking these bad designs bugs serious, I worry that any new features will be designed just as bad?
In this case about the duplicate SQL, I have even traced them down for You and supplied You with a suggested optimization and still no action?