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 for getting member info

10 years 2 weeks ago
  • Tobias's Avatar
    Topic Author
  • Tobias
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Licenses:
JomSocial Expired

Each of the "$event->getMemberStatus($my->id)" and the "$event->isAdmin($my->id)" in the template file layouts/events/single.php results in a round trip to the database for getting member info. Could the results of the first lookup per userid not be cached on the events object?

10 years 2 weeks ago
Licenses:

Hi Tobias,

maybe jomsocial still need code improvement. I cant give any solution yet, because the code still like that.
do you have any issue with duplicate SQL?

Regards

10 years 2 weeks ago
  • Tobias's Avatar
    Topic Author
  • Tobias
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Licenses:
JomSocial Expired

I agree that the duplicate SQL's I found are simple ones that me be very fast in execution and that I might not have as fast a database server available as others, causing this to be a bigger topic for me than for others. But it is still wasted execution time. Secondly, is it to me bad by design. I expect serious vendors to test their components and find & optimize these by themselves. Thirdly, it is frustrating to write extensions to JomSocial, as I need to go through all the pinpointed duplicate SQL's and check if I caused it or if it originates from native JomSocial.

Other customers / vendors: feel free to comment your opinion.

10 years 2 weeks ago
  • Tobias's Avatar
    Topic Author
  • Tobias
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Licenses:
JomSocial Expired

More optimization:
No reason to check database if userid is 0 (guest user) in file tables/event.php in:
public function getUserStatus($userid) {
...
}

I think this should be added first thing in the fuction:
if ($userid == 0){
return COMMUNITY_EVENT_STATUS_NOTINVITED;
}

10 years 2 weeks ago
Licenses:

Hi Tobias,

i will assign this topic to developer for some code improvement.

Regards

10 years 2 weeks ago
Licenses:

Hi Tobias,

Done as requested except for the usergroup map. because have to make sure everything is fine before removing that code. for usergroup maybe we will put at version 4.1.

for the changes please wait for jomsocial next release (bug fixes).

Regards

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