[Closed] The Joomdlehooks plugin slows down (Jomsocial)

  • Fabio Ballor
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
13 years 9 months ago - 13 years 8 months ago #1 by Fabio Ballor
Hi,

I noticed that activating the plugin Joomdlehooks the system slows down so much.
The loading of pages is significantly slower than when it is turned off.

This is a known issue? someone has occurred?

What happens if I leave the plugin Joomdlehooks disabled? What is this plugin?

I using joomla 1.5.23 and Moodle 2

Thanks
mapik
Last edit: 13 years 8 months ago by Chris.

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: The Joomdlehooks plugin slows down joomla
Hi.

Joomdlehooks plugin is only triggered on user actions (login, logout, user save), so I don't know how it could slow down other pages, unless some other extension you are using is calling these events.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #3 by Ben Cheek
Replied by Ben Cheek on topic Re: The Joomdlehooks plugin slows down joomla
I've noticed something similar with the JomSocial home page. Here's the results from debugging mode (site with jFusion given for comparison):

Site A with jFusion / JomSocial:Home:
Profile Information
Application afterLoad: 0.000 seconds, 0.24 MB
Application afterInitialise: 0.321 seconds, 4.17 MB
Application afterRoute: 0.335 seconds, 4.78 MB
Application afterDispatch: 2.890 seconds, 11.25 MB
Application afterRender: 2.986 seconds, 12.55 MB
Memory Usage
13251432
163 queries logged

Site B with Joomla / JomSocial:Home:
Profile Information
Application afterLoad: 0.000 seconds, 0.23 MB
Application afterInitialise: 0.098 seconds, 3.81 MB
Application afterRoute: 0.113 seconds, 4.49 MB
Application afterDispatch: 32.074 seconds, 16.04 MB
Application afterRender: 32.166 seconds, 17.33 MB
Memory Usage
18265592
426 queries logged

Site B with Joomdlehooks disabled / JomSocial:Home::
Profile Information
Application afterLoad: 0.000 seconds, 0.23 MB
Application afterInitialise: 0.095 seconds, 3.81 MB
Application afterRoute: 0.111 seconds, 4.49 MB
Application afterDispatch: 0.872 seconds, 15.93 MB
Application afterRender: 0.964 seconds, 17.23 MB
Memory Usage
18162544
423 queries logged

Notice Site B with Joomdle working normally takes over 30 seconds to load, even though little extra memory is used and only a few additional queries!

Did some poking around and discovered the onAfterStoreUser function in the joomdlehooks plugin is running 24 times on Site B's JomSocial Home. JomSocial must be triggering the event for almost every item it assembles on the page.

I've been trying to modify joomdlehooks to use JomSocial's events as triggers, but no luck.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Re: The Joomdlehooks plugin slows down joomla
Hi there.

Thanks for the detailed debugging. I took a look and can confirm the problem.

After digging into Jomsocial code, I found out the code responsible for the calls, in file components/com_community/libraries/user.php.
Code:
// Update group list if we haven't get if( $this->_params->get('update_cache_list', 0) == 0 ) { //dont load updateGroupList in the backend if(strpos(JURI::current(),'administrator') == false) { $this->updateGroupList(); $this->updateEventList(); } $this->save(); }

The line $this->save(); saves the user,which calls the user plugins.

Changing first line to:
if( $this->_params->get('update_cache_list', 1) == 0 )
Solves the problem.
Thing is even when it is checking the update_cache_list param, I could not find the param anywhere else in the code, so it is not possible to configure this.

I would contact Jomsocial team, to try to find out if this is a bug/intended behaviour, and let them know of the problems it is causing (not only with joomdle, as any other user plugin will also be called).
If you do so, please let us know what they tell you.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #5 by Ben Cheek
Replied by Ben Cheek on topic Re: The Joomdlehooks plugin slows down joomla
Thanks for researching this. I'll be contacting JomSocial for a fix. I can't imagine it's practical to have all user plugins behaving this way.

Here's the debug profile of the same site above with the fix applied:

Profile Information
Application afterLoad: 0.000 seconds, 0.23 MB
Application afterInitialise: 0.099 seconds, 3.81 MB
Application afterRoute: 0.115 seconds, 4.49 MB
Application afterDispatch: 0.749 seconds, 15.27 MB
Application afterRender: 0.844 seconds, 16.57 MB
Memory Usage
17471360
135 queries logged

The huge drop in MySQL queries must account for quite a bit of the tremendous load speed difference, along with the file load times and additional queries for all the user plugins that where loading each time. This led me to wonder if this is a JomSocial bug appearing between versions. Site A (above) is running 1.5.248 while Site B was running 2.4.0. I've since upgraded it to 2.4.2 and can confirm the issue still exists without your fix.

I'll let you know what JomSocial says. Thanks again for the help.

Please Log in or Create an account to join the conversation.