Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
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.

Duplicate SQL's for getting user info

11 years 6 months ago
  • Tobias's Avatar
    Topic Author
  • Tobias
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Licenses:
JomSocial Expired

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

11 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Tobias,

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.

But well, thank you for your report.

cheers.

11 years 6 months ago
  • Tobias's Avatar
    Topic Author
  • Tobias
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Licenses:
JomSocial Expired

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?

11 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

We alrready reported this, our dev will check this

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW